How to do "for each month in 2008 sum amount where category is cash"

The table format is:
Date(MM/DD/YYYY) Amount Description Category Account
01.02.2008 -21000 benzina (C) Calatorii Cash
01.04.2008 -2000 Mancare (C) Calatorii Cash
01.05.2008 -2000 Mancare (C) Comisioane Cash
05.12.2008 4706 diverse (C) Comisioane BT - Mondo
08/25/2008 8807 diverse (C) Calatorii BRD - PFA
08/25/2008 104000 diverse (C) Comisioane BRD - Multiplan
10.10.2008 6385849 diverse (C) Comisioane BRD - Atucont
10/26/2008 943699 diverse (C) Calatorii BRD - ISIC
10/27/2008 95313 diverse (C) Comisioane Cash
10/28/2008 -300 Comisioane (C) Comisioane BRD - ISIC
I am trying to do the following:
for each month in 2008
sum (Amount) where Category is (C) Calatorii
=>
January -23000
February 0
for each month in 2009 up until now
sum (Amount) where Category is Cash
=>
January 35000
With these 2 samples I can manage the other functions I need.
Thanks in advance.

Question asked and responded several times.
In column H of the first table I inserted the formula:
=YEAR(B)*100+MONTH(B)
In column B of the second table, the formula is:
=SUMIFS(Tableau 1 :: C,Tableau 1 :: G,"=Cash",Tableau 1 :: H,"="&A)
CAUTION
I don't know your system settings.
If your system uses the decimal comma, you will have to use:
=SUMIFS(Tableau 1 :: C;Tableau 1 :: G;"=Cash";Tableau 1 :: H;"="&A)
Yvan KOENIG (from FRANCE jeudi 23 avril 2009 15:04:49)

Similar Messages

  • Trouble summing expenses for each month

    I use a website to track my expenses and it exports to csv. I plan on building some graphs based on that csv.
    The csv format is:
    Date(MM/DD/YYYY),Amount,Description,Category,Account,Jived,
    01/02/2008,-210.00,"benzina",(C) Calatorii,Cash,yes,
    4/4/2009 ...
    I am trying to do the following:
    1) do the following algorithm:
    for each month in 2008
    sum (Amount) where Category is Cash
    for each month in 2009 up until now
    sum (Amount) where Category is Cash
    fill NEWTABLE with rows where description matches Calatorii AND matches somethingelse
    2) use numbers to autoupdate the graphs' value from the csv file instead of importing it as a table every time I need to update
    I am new to Numbers but I think that with these samples I'll manage to design my graphics.

    Answer found here: http://discussions.apple.com/thread.jspa?threadID=1985495&tstart=0 It seems starting a similar thread in Numbers 2009 was more useful than staying within the proper category.

  • How to apply Date condition for each month in 12 month period to my SQL query

    I am trying to retrieve all Outstanding Problem tickets in my Trendline SSRS report.
    I need to pull the OpenDate <= Last day of last month And CloseDate >= 1st day of current month
    for each month in the Last 12 months. How do I accomplish this in my query?
    I must also need to pull the oustanding tickets for the next 11 months in the same query
    where it will automatically pull the outstanding tickets for when a new month comes
    in out of the 12 month period?
    Here's a sample of my query to pull July 2013 Outstanding Problem tickets:
    Select OpenDate, CloseDate, Ref_Num, Type, status
    From Call_Req
    Where OpenDate <= '2013-07-31 00:00:00' And CloseDate >= '2013-08-01 00:00:00'
    And Type = 'P'
    My Results:
    OpenDate
    CloseDate
    Ref_Num
    Type
    status
    6/13/2013 7:41
    8/26/2013 12:41
    P1726456FY13
    P
    CL
    6/13/2013 8:17
    8/23/2013 12:31
    P1726612FY13
    P
    CL
    6/13/2013 10:17
    9/6/2013 16:54
    P1727352FY13
    P
    CL
    7/12/2013 10:46
    9/6/2013 10:23
    P1812568FY13
    P
    CL
    7/18/2013 10:17
    9/6/2013 8:53
    P1830452FY13
    P
    CL
    7/29/2013 15:54
    9/6/2013 16:16
    P1862906FY13
    P
    CL
    5/17/2013 20:51
    8/22/2013 9:09
    P1653380FY13
    P
    CL
    5/30/2013 13:29
    8/26/2013 7:33
    P1685693FY13
    P
    CL
    7/15/2013 14:14
    9/7/2013 9:42
    P1818874FY13
    P
    CL
    6/7/2013 15:49
    9/6/2013 16:46
    P1712265FY13
    P
    CL
    7/18/2013 10:25
    9/7/2013 9:18
    P1830516FY13
    P
    CL
    7/24/2013 16:30
    8/12/2013 18:26
    P1849909FY13
    P
    CL
    Talitha Davis

    Would this Work?
    DECLARE @now DATE = GETDATE();
    WITH months(lvl, daydate)
    AS (
    SELECT
    1,
    @now
    UNION ALL
    SELECT
    lvl + 1,
    DATEADD(MONTH, -1, daydate)
    FROM months
    WHERE lvl < 12
    ), dateranges(period, opendate, closedate)
    AS (
    SELECT
    CAST(YEAR(daydate) AS CHAR(4))
    + '-'
    + RIGHT('0' + CAST(MONTH(daydate) AS varCHAR(2)), 2),
    DATEADD(DAY, 0-DAY(daydate), daydate),
    DATEADD(DAY, 1-DAY(daydate), daydate)
    FROM months
    SELECT
    b.period,
    a.OpenDate,
    a.CloseDate,
    a.Ref_Num,
    a.Type,
    a.status
    From Call_Req a
    INNER JOIN dateranges b
    ON
    a.OpenDate <= b.opendate
    AND
    a.CloseDate >= b.closedate
    WHERE Type = 'P';
    Microsoft Certified Trainer & MVP on SQL Server
    Please "Propose as Answer" if you got an answer on your question, and vote for it as helpful to help other user's find a solution on a similar question quicker.

  • Within the budget template; how would one create an entire year worth of a budget; with out having to create a separate page for each month?

    Help!
    Loving the budget template, but I would like to be able to create an entire years worth of a buget with out creating a whole new transaction/budget page for each month. How do I get the new transaction to identify a new budget chart?
    Thanks, Emily

    Emily,
    No need to think the budget template is only for one month.  Just keep typing the date in the date column of the "Transactions" sheet and the details will update.  You should adjust the budget categories to match the duration of time you want to use.
    If you do want month-by-month, then you can switch to the "Transactions" sheet, select the table, cut
    then switch back to the "Budget" sheet, paste.
    Now rename the "Budget" sheet something like "Budget Jan 2014", and delete the "Transactions" sheet. Set the budget for Jan in the column I highlighted above.  The subsequent months, duplicate the monthly budget:
    Then adjust the the entries in the transactions table inside this sheet.

  • How can i see cost centre wise employee level salary breakdown for each month ? can anybody help me.

    plz anyone help me.

    thanks, Nguyen. can i get a employee salary breakdown for each month with this tcode.

  • Urgent !!Report Fiscal year for each Month i.e.12mnths

    Hi All,
      I have a cube with following details.
    1.Revenue Value ==1200
    2.Fiscal year==2007
    3.Product type==A
    But If i need to create a Dashboard Report with this Cube,
    But it has display tht Fiscal Year Value 2000 for each month
    Like ..KF=1200/12(months)
    So i need display as follows for the graph...
    MONTH        JAN     FEB   MAR...............................DEC
    REVENUE     100    100    100...................................100
    THIS IS HOW MY REPORT SHLD BE EXECUTED..
    But I dont have any date or month field in my cube,how can I get it for Each month as above..??????
    Can any one explain me & suggest me how to proceed..???
    Thnx
    BI Learner

    Hi Voodi,
    That is the only solution... which i have in my mind...Let me try it out & get back to u..
    But as well I have another KF under that Revenue which display for each month & we need to run a dashboard with line diagram where one line for Revenue & another for PO which shld give a comparison for all the months...
    Does this work out??
    Thanks a lot for ur ideas.

  • For Each Month Dimenstion in Universe

    Hello All,
       I would like to to create each month object/dimension in my universe.
    I would like to see sum value( for ex: plan cost, for each month )when i select the date range for each month.
    How can i create Object/Dimension each month in Universe Designer?
    Please help me.
    Thanks
    Muvva

    yes

  • Different BOM for each month

    Hi,
    The BOM is different for each month. If i make different alternatives for each month and run the LTP will it help to get the raw material requirement as per the BOM for that month. Example BOM for NOV/DEC will be not same but we want to estimate the raw material req for next year.
    Kindly advise what i need to do?
    Regards
    ShankarR

    Dear Shankar,
    1.What is the business contraint in using change number functionality to address this requirement without creating any
    additional alternative BOM?
    2.Say you create the first alternative BOM using a change number and save all the BOM components.
    3.The default valid from date will be the valid from date of the change number and valid to date will be 31.12.9999.
    4.Whenever there is a BOM change use a different change number with valid from date say 25.10.2010,so using this in the
    same BOM delete the components and add the new component's or make any BOM change and save.
    5.For the deleted components the valid from date will be say (you have created using today's date for BOM creation)
    05.10.2010 and the valid to date will be 25.10.2010.
    6.What is the advantage of creating new alternative BOM?
    6.How are you using the LTP results for inventory purpose,say how are you planning the raw material's requirement for the
    next year based on this year's BOM?
    7.LTP is not only the feasibility of material procurement,but also production that can be produced with available resource.
    Check and revert
    Regards
    S Mangalraj

  • Calculate total empoyee days (as of present) that have elapsed for each month in a FY

    Hello, everyone,
    I'm running CF server connecting to an Oracle (11g)  db.
    I have a table that keeps track of projects (past, present, future) and need a way to sum the days for each project, for each month, that have happened.
    For example.
    ID   -
    Name         
    -   Start
    -   Stop 
    - Employees
    001
    Project A     
    01-Oct-14
    31-Dec-14      
    8
    002
    Project B     
    06-Feb-15
    21-Feb-15      
    9
    003
    Project C     
    30-Oct-14
    29-Nov-14      
    3
    004
    Project D     
    26-Dec-14
    16-Apr-15     
    21
    I'm trying to create an overview where the display will have the months of a Fiscal Year go across the page, indicating the number of employee days for each project that have elapsed. (NOT counting the current day).  New requirement: To make matters even more complex, there is a related table for the employees showing what dates they actually started and stopped (not every employee starts on day 1 and ends on the last day.. some start a day or two after the project start, etc.)
    I'm not wrapping my head around this, for some reason. Mental block. Any ideas?
    Someone in another forum suggested a PIVOT.  That's above my paygrade (I have never used PIVOT, don't understand how it works, etc.)
    V/r,
    ^_^

    This may be a good start. Display by Month Year the Average and Sum Dates between Start and Stop by Project.
    SELECT      CAST    (
            (CAST(MONTH(Start) AS varchar(2)) + '/01/' + CAST(YEAR(Start) AS varchar(4)))
            AS DateTime
        AS DatePeriod,
        AVG(DateDiff(day, Start, Stop)) AS AverageDaysToClose,
        SUM(DateDiff(day, Start, Stop)) AS SumTotalDaysToClose,
        Name
    FROM     Projects
    GROUP BY CAST    (
            (CAST(MONTH(Start) AS varchar(2)) + '/01/' + CAST(YEAR(Start) AS varchar(4)))
            AS DateTime
        Name
    ORDER BY DatePeriod, Name

  • How to use For-Each Structure with Multiple node XML structure

    Hi,
      How to use for-each (BPEL 2.0) construct for Multinode XML structure.
    Here is the easy case: I have list of suppliers specified by supplier
    <supplierList>
    <supplier>1</supplier>
    <supplier>2</supplier>
    <supplier>3</supplier>
    </supplierList>
    Now there is a web service http://hostname/getsupplierdetails/wsdl which accepts one supplier at a time.
    like
    <supplier>1</supplier>
    reponse object is
    <message> notfound/found </message>
    But how can I use for each of XML node to call this service and collect the result like
    <supplierList1>
         <Suppinfo>
            <supplier>1</supplier>
            <message> not found</message>
    </suppinfo>
        <suppinfo>
            <supplier>1</supplier>
            <message> not found</message>
    </suppinfo>
    </supplierlist1>
    Thanks

    For looping you use foreach loop and , loop for the number of occurences and when constructing response, adding a new element you have to use bpelx:append.  Good sample at Enterprise Integration: Oracle SOA Suite 11g: Populating a list or an array in BPEL without using XSLT.

  • MDX to dynamically create period to date for each month of current year

    I need some help with MDX. I am not even sure if this is possible to do but here is what I need.  Any help is greatly appreciated.
    I have a Date dimension with a hierarchy defined as Year-Qtr-Month-Date
    I have a measure called Rentals
    Assume the current date is 10/24/2014.  I want to display by month for the year 2014, the sum of rentals equivalent to the current MTD.  So January would sum 1/1 thru 1/24.  February would sum 2/1 thru 2/24.  March would sum 3/1 thru
    3/24, etc.
    On the end of the current month, all months would display the sum of the whole month. I am not concerned if a month ends on the 30th or 31st.  The end is end.
    It needs to be dynamic enough so that if the current date is the 27th, each month would sum from the 1st to the 27th.

    Hi Rocko,
    According to your description, you want to compare the sum amount of rentals for each month, right?
    In MDX, we can use
    PARALLELPERIOD function returns a member from a prior period in the same relative position as a specified member. So you can use the query like
    with set Period as {[Arrival Date].[Date].[Month].&[2014]&[1]:[Arrival Date].[Date].[Month].&[2014]&[27]}
    member [Arrival Date].[Date].[0] as sum({Period})
    member [Total Amount N-1] as (PARALLELPERIOD([Arrival Date].[Date].[Month], 1, [Arrival Date].[Date].[Year].&[11]), [Measures].[Total Amount])
    Here is a sample query on AdventureWorks cube.
    SELECT ParallelPeriod ([Date].[Calendar].[Calendar Semester]
    , 3
    , [Date].[Calendar].[Month].[October 2003])
    ON 0
    FROM [Adventure Works]
    Regads,
    Charlie Liao
    TechNet Community Support

  • Min date for each month from list

    Hi all,
    I need to select only minimal date for each month from this sample query:
    select date '2011-01-04' as adate from dual union all
    select date '2011-01-05' as adate from dual union all
    select date '2011-01-06' as adate from dual union all
    select date '2011-02-01' as adate from dual union all
    select date '2011-02-02' as adate from dual union all
    select date '2011-02-03' as adate from dual union all
    select date '2011-10-03' as adate from dual union all
    select date '2011-10-04' as adate from dual union all
    select date '2011-10-05' as adate from dual So the result should be:
    04.01.2011
    01.02.2011
    03.10.2011How do I perform it?

    WITH dates
         AS (SELECT DATE '2011-01-04' AS adate FROM DUAL
             UNION ALL
             SELECT DATE '2011-01-05' AS adate FROM DUAL
             UNION ALL
             SELECT DATE '2011-01-06' AS adate FROM DUAL
             UNION ALL
             SELECT DATE '2011-02-01' AS adate FROM DUAL
             UNION ALL
             SELECT DATE '2011-02-02' AS adate FROM DUAL
             UNION ALL
             SELECT DATE '2011-02-03' AS adate FROM DUAL
             UNION ALL
             SELECT DATE '2011-10-03' AS adate FROM DUAL
             UNION ALL
             SELECT DATE '2011-10-04' AS adate FROM DUAL
             UNION ALL
             SELECT DATE '2011-10-05' AS adate FROM DUAL)
    SELECT TO_CHAR (MIN (adate), 'DD.MM.YYYY') adate
      FROM dates
      GROUP BY to_char(adate, 'YYYY.MM')
    ADATE
    03.10.2011
    01.02.2011
    04.01.2011

  • Year Duplicated For Each Month

    Hey everyone,
    I am using Oracle Business Intelligence 11.1.1.6.2 currently and I have just tried to create a report, but there is a problem.
    I drag & drop the year column from the Subject Area section to the right. Instead of getting:
    2005
    2006
    2007
    I get 2005 twelve times, 2006, another twelve times, etc. as if the second column shows the months. The only column I have selected from the subject area is the year column, however. There is nothing else.
    Any ideas on what may be causing this? Trying different browsers didn't work.
    Best Regards,
    Cihan

    Before I try your suggestions, I have found some sort of workaround for this:
    I go to Column Properties, then select Column Format. Value Suppression -> Suppress
    With this selected, each year appears just once, not twelve times (once for each month).
    My Fact table is joined to the Dimension table with this statement:
    "YK_DISCREPANCY".""."DW"."DIM_MONTH"."MONTH" = "YK_DISCREPANCY".""."DW"."FACT_DISCREPANCY_DETAIL"."MONTH_DISCREPANCY" AND "YK_DISCREPANCY".""."DW"."DIM_MONTH"."YEAR" = "YK_DISCREPANCY".""."DW"."FACT_DISCREPANCY_DETAIL"."YEAR_DISCREPANCY"
    This is most likely the reason, right?
    BR

  • Query to count ACTIVE records for each month

    All,
    I have a requirement to count the number of active customers for each month of an year. Let's say, we have 3 fields in the table:
    ID               ActiveStart             ActiveEnd
    1                 1/1/2014               11/30/2014
    In this scenario, the member with ID was active for all the months (Jan-November) EXCEPT, December. So, the result set I am expecting for the Month of January to December is like below:
    Month       CountOfMembers
    Jan            1
    Feb           1
    Mar           1
    April          1
    May           1
    June          1
    July           1
    August      1
    Sept          1
    Oct            1
    Nov           1
    Dec           0 (Since, the member was NOT active in this month)
    Similarly, if you have another member whose start date is 1/1/2014 and termination is '5/31/2014', then, I would need to add 1 for months of January till May, the member WON'T be counted for the rest of the months. So, in this case, the count will be come
    "2" for months January till May, it will remain "1" for June till November and still "O" for December.

    >>I have a requirement to count the number of active customers for each month of an year. Let's say, we have 3 fields [sic: columns are not fields] in the table [sic: tables have names]: <<
    Please follow basic Netiquette and post the DDL we need to answer this. Follow industry and ANSI-ISO standards in your data. You should follow ISO-11179 rules for naming data elements. You should follow ISO-8601 rules for displaying temporal data. We need to
    know the data types, keys and constraints on the table. Avoid dialect in favor of ANSI-ISO Standard SQL. And you need to read and download the PDF for: 
    https:--www.simple-talk.com-books-sql-books-119-sql-code-smells-
    There is no magical universal “id” in RDBMS, tables have names and columns have constraints and types. Most of the work in SQL is done in the DDL. Here is a possible schema. 
    CREATE TABLE Duty_Roster
    (member_nbr INTEGER NOT NULL PRIMARY KEY,
     duty_start_date DATE NOT NULL,
     duty_end_date DATE NOT NULL,
    CHECK (duty_start_date <= duty_end_date),
    INSERT INTO Duty_Roster
    VALUES 
    (1, '2014-01-01', '2014-11-30'),
    (2, '2014-01-01', '2014-05-31');              
    >> In this scenario, the member with ID was active for all the months (Jan-November) EXCEPT, December. So, the result set I am expecting for the Month of January to December is like below: <<
    A month is a temporal measurement that makes no sense without a year. But if you knew the ISO temporal model, you would see that you have what is called an INTERVAL data type. T-SQL does not support it yet. 
    Since SQL is a database language, we prefer to do look ups and not calculations. They can be optimized while temporal math messes up optimization. A useful idiom is a report period calendar that everyone uses so there is no way to get disagreements in the DML.
    The report period table gives a name to a range of dates that is common to the entire enterprise. 
    CREATE TABLE Month_Periods
    (month_name CHAR(10) NOT NULL PRIMARY KEY
       CHECK (month_name LIKE  '[12][0-9][0-9][0-9]-[01][0-9]-00'),
     month_start_date DATE NOT NULL,
     month_end_date DATE NOT NULL,
      CONSTRAINT date_ordering
        CHECK (month_start_date <= month_end_date),
    etc);
    These report periods can overlap or have gaps. I like the MySQL convention of using double zeroes for months and years, That is 'yyyy-mm-00' for a month within a year and 'yyyy-00-00' for the whole year. The advantages are that it will sort with the ISO-8601
    data format required by Standard SQL and it is language independent. The pattern for validation is '[12][0-9][0-9][0-9]-00-00' and '[12][0-9][0-9][0-9]-[01][0-9]-00'
    SELECT M.month_name, COUNT(R.member_nbr) AS member_cnt
      FROM Month_Periods AS M,
           Duty_Roster AS R
     WHERE M.month_start_date 
           BETWEEN R.duty_start_date AND R.duty_end_date
       AND M.month_end_date 
           BETWEEN R.duty_start_date AND R.duty_end_date;
    We had no business rules about partial months, so I guessed. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Creating a Report to track what was invoiced for each month then quarter

    I was wondering if anyone knew how to create a report adding up each month then adding it up by quarter.   This is what i am working with:
    Job:  Invoice Date 1,2 ,3 and Invoice Amount 1, 2, 3
    Job 2:  Invoice Date 1, 2 and invoice amounte 1, 2
    one job might have a invoice date with May as #1 and then # 2 is June when the next job could have 2 invoice dates in 1month. 
    the way i have the report set up currently it will take the final date and file it under that month then it will calculate all the amounts for the one month..;
    does anyone have any ideas how to seperate the amounts?  and maybe add the job to more then 1 month if needed based off the invoice date?

    I have tried to do that but the only problem is i have more then 1 invoice for some orders because we have shipped partial orders. 
    I have my search set up on invoice date 1, 2, and 3 but if a order has 2 deliverys invoice 1 is in the previous month it still calls it up because i have to include the field for the other orders and don't know how to tell it not to add that value into the specific month i want..
    I don't know if i am making any since?
    Thank you

Maybe you are looking for