Find Sum of grouped events by date

I'm using Report Builder 10.50.2500.0
I've been trying to do this for awhile and have run out of ideas to try.  I think it's a simple solution but I can't figure it out.
I have a database that is used for events. A booking can have several different events associated with it, even on the same day at different times.  The events can be classified as breakfast, lunch or dinner events.
The report is grouped by type of event, then by event date (not datetime, the overall date), then grouped by booking.
Basically, I need the sum the total attendance of each breakfast, lunch, and dinner event by date and by booking.
For breakfast events I have this code on the Event Classification group row:
=iif(Fields!EventClassification.Value = "Breakfast",SUM(Fields!CurrentAttendance.Value),0) and the same for lunch and dinner. This works except when when there is more than one event per day.
For example, on 6/11/13 there is one lunch event and one dinner event.  The report shows
Date
EventName
Breakfast
Lunch
Dinner
6/11/13
EventName
0
50
0
6/11/13
EventName
0
0
50
When what I want is:
Date
EventName
Breakfast
Lunch
Dinner
6/11/13
EventName
0
50
50
Any ideas?  I've tried using group variables and passing to a report variable and acting on that but that didn't work out properly.

Hi Jmelinda,
In order to achieve your requirement, we can refer to the following steps:
In the Row Groups pane, right-click the Details group to add a parent group grouped by Date field.
Right-click the Date group to add a parent group grouped by Date field.
Right-click the Date group to add a total row after the group.
Delete the second and third columns with “Delete columns only” option for Date field.
Type the expression below to the total row for Breakfast column, and the same for lunch and dinner:
=sum(iif(Fields!EventClassification.Value = "Breakfast", Fields!CurrentAttendance.Value, 0))
Set the visibility of second row to Hide.
The following screenshot is for your reference:
If there are any other questions, please feel free to ask.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support

Similar Messages

  • Finding Sum of grouped lines / Tables EKKO, EKPO

    Hi, am using the following tables:
    TABLES: ekko,ekpo.
    with Inner Join
    select ekkobukrs ekkoebeln ekkoaedat ekkobsart ekkoekgrp ekkolifnr ekkowaers ekkowkurs ekkoernam ekpobrtwr
       into CORRESPONDING FIELDS OF TABLE itab from ekko
        inner join EKPO on ekPOEBELN = ekkoebeln.
    end-OF-SELECTION.
    Basically i want to group the result of this SQL statement by Purchasing Doc (ekko~ebeln) and display the
    sum of Gross value (ekpo~brtwr) for the line items of  each Purchasing Doc.
    Note: i want the Purchasing Doc to appear one time only in the report
    i have tried the following :
    select  ekkobukrs ekkoebeln ekkoaedat ekkobsart ekkoekgrp ekkolifnr ekkowaers ekkowkurs ekkoernam sum(  ekpobrtwr )
       into  CORRESPONDING FIELDS OF TABLE itab from ekko
       inner join EKPO on ekPOEBELN = ekkoebeln
    WHERE ekkobukrs IN S_bukrs AND ekkobsart IN s_bsart
    Group By  ekkoebeln ekkobukrs ekkoaedat ekkobsart ekkoekgrp ekkolifnr ekkowaers ekkowkurs ekko~ernam.
    then loop through the ITAB:
    LOOP at itab.
    write:/ itab-bukrs under 'Company Code',
             itab-ebeln UNDER 'PO-Number',
             itab-aedat UNDER 'Date' ,
             itab-bsart UNDER 'Doc-Type'  ,
             itab-ekgrp UNDER 'Purchase-Grp' ,
             itab-lifnr UNDER 'Vendor' ,
             itab-waers UNDER 'Currency',
             itab-wkurs UNDER 'Rate' ,
             itab-brtwr under 'Gross Value',
             itab-ernam UNDER 'Created By'.
    ENDLOOP.
    but it is not working with me, am not able to show the result of sum(  ekpo~brtwr ) am getting 0 in all lines
    thanks a lot for your help

    " My Full Code.
    TABLES: ekko,ekpo,ekbe,rbkp.
    data: BEGIN OF itab OCCURS 0,     "EKKO TABLE"
          inco1 like ekko-inco1,
          inco2 like ekko-inco2,
          bukrs like ekko-bukrs,
          ebeln like ekko-ebeln,
          aedat like ekko-aedat,
          bsart like ekko-bsart,
          ekgrp like ekko-ekgrp,
          lifnr like ekko-lifnr,
          waers like ekko-waers,
          wkurs like ekko-wkurs,
          ernam like ekko-ernam,
          BRTWR LIKE ekpo-brtwr,
      end of itab.
    SELECT-OPTIONS : s_bukrs FOR itab-bukrs OBLIGATORY,
                     s_ebeln for itab-ebeln ,
                     s_aedat FOR itab-aedat ,
                     s_bsart for itab-bsart ,
                     s_ekgrp FOR itab-ekgrp ,
                     s_lifnr FOR itab-lifnr ,
                     s_budat FOR jtab-budat ,
                     s_bewtp for jtab-bewtp .
    DATA ProceesITAB LIKE SORTED TABLE OF ITAB WITH UNIQUE KEY TABLE LINE.
    AT SELECTION-SCREEN on s_bukrs.
    START-OF-SELECTION.
    select ekkobukrs ekkoebeln ekkoaedat ekkobsart ekkoekgrp ekkolifnr ekkowaers ekkowkurs ekkoernam ekpobrtwr
       into CORRESPONDING FIELDS OF TABLE itab from ekko
        inner join EKPO on ekPOEBELN = ekkoebeln.
      end-OF-SELECTION.
    LOOP at itab.
    write:/ itab-bukrs under 'Company Code',
             itab-ebeln UNDER 'PO-Number',
             itab-aedat UNDER 'Date' ,
             itab-bsart UNDER 'Doc-Type'  ,
             itab-ekgrp UNDER 'Purchase-Grp' ,
             itab-lifnr UNDER 'Vendor' ,
             itab-waers UNDER 'Currency',
             itab-wkurs UNDER 'Rate' ,
             itab-brtwr under 'Gross Value',
             itab-ernam UNDER 'Created By'.
    ENDLOOP.
    TOP-OF-PAGE.
    write:/70 'Company'.
    uline.
    skip.
    write:/5 'Company Code',25 'PO-Number',40 'Date',55 'Doc-Type',70 'Purchase-Grp',85 'Vendor',100 'Currency',115 'Rate',125 'Created By',
    140 'Gross Value'.
    ULINE.
    SKIP.
    Edited by: YasinN on Mar 24, 2010 9:45 AM

  • Sum of LineCount Including Groups and Detail Data On Each Page Used To Generate New Page If TotalPageLineCount 28

    Post Author: tadj188#
    CA Forum: Formula
    Needed: Sum of LineCount Including Groups and Detail Data On Each Page Used To Generate New Page If TotalPageLineCount > 28
    Background:
    1) Report SQL is created with unions to have detail lines continue on a page, until it reaches page footer or report footer, rather than using  subreports.    A subreport report is now essentially a group1a, group1b, etc. (containing column headers and other data within the the report    with their respective detail lines).  I had multiple subreports and each subreport became one union.
    Created and tested, already:
    1) I have calculated @TotalLineForEachOfTheSameGroup, now I need to sum of the individual same group totals to get the total line count on a page.
    Issue:
    1) I need this to create break on a certain line before, it dribbles in to a pre-printed area.
    Other Ideas Appreciated:
    1) Groups/detail lines break inconveniently(dribble) into the pre-printed area, looking for alternatives for above situation.
    Thank you.
    Tadj

    export all image of each page try like this
    var myDoc = app.activeDocument;
    var myFolder = myDoc.filePath;
    var myImage = myDoc.allGraphics;
    for (var i=0; myImage.length>i; i++){
        app.select(myImage[i]);
        var MyImageNmae  = myImage[i].itemLink.name;
        app.jpegExportPreferences.jpegQuality = JPEGOptionsQuality.high;
        app.jpegExportPreferences.exportResolution = 300;
           app.selection[0].exportFile(ExportFormat.JPG, File(myFolder+"/"+MyImageNmae+".JPEG"), false);
        alert(myImage[i].itemLink.name)

  • How to find the Acoount Group used while creating the customer master data.

    Hi,
    I am in xd03 mode displaying the customer master data. I want to know the ACCOUNT GROUP which was used while create this customer. How can i find it? Can any one tell me the process to find the account group?
    Thanks in advance.

    Enter the customer number in XD03 and click enter. Once the screen displays the customer name go to dropdown extras--> Administrative Data. This will give you the account group and the creation date of the customer. The same is stored in KNA1- KTOKD.
    Thanks
    Indranil

  • Is it possible to sum across groups

    Dear all,
    I want to define a template for AP cash requirement report to sum amount to be paid by vendor. The XML tree structure is to first group by Due Date and then group by Vendor. Therefore, the invoices to be paid can be under different Due Date groups. My question is, is it possible to sum by Vendor name regardless which Due Date group (the parent group) it belongs to?
    Thanks!
    Sandy

    Hi,
    Seems the XML tree is not allowed to be posted here. Please find it in the link below. G_Date is a parent group of G_Vendor. I want to be able to sum by vendor regardless of the which G_Date group it is belonged to. Please advise. Thanks!
    https://communities.oracle.com/portal/server.pt/community/view_discussion_topic/216?threadid=80778&aggregatorResults=T80778T79511T79424T78340T78009T76654T70958T47945T46834T45020&returnUrl=https://communities.oracle.com/portal/server.pt/community/discussions/209#80778

  • See events by date

    Would like to display recent 450 image shoot in events by date, but don't know how to do that. Now that I've updated Iphoto, can't even find the date/time of the individual pictures. Have camera (Canon G11) set to sort by date, but not to display date on actual images.

    What I really meant and want is to have them grouped in events by date.
    I have no idea what you want - there is not  (and never has been) a way to group events - when you import from your camera the event structure is determined by your settings in the iPhoto preferences - unless you have unchecked the preference to split photos imported from the finder into events imports from disk will be treated the same
    The camera was set to make "folders" by date, and I had hoped/expected them to group in separate events by date.
    iPhoto does not do anything with those folders - if you were to manually drag the folders to iPhoto (and have the option to split items imported via the finder off) then iPhoto will make a event of each folder
    b) I had stumbled on the info once before and forgotten it, often is out of site in window and must remember to look; kept trying to get it by clicking on the indicator on the image, as in previous Iphoto iteration. "Change"=improvement?
    remembering that this strictlhy a user to user forum- is there a question there?
    LN

  • Extraction and loading of Training and Event Management data (0HR_PE_1)

    hello,
    I've got the following doubt:
    before BI 7.0 release, extractor 0HR_PE_1 extracts event data (eventid, attendee id, calday,...) but if you load straight to cube 0PE_C01, as Calendar year/month needs a reference date (for example, event start date), you'll get total duration of event in hours or days refered to event star date.
    So in a query filtered by month, you get total duration of an event that starts in the filtered month but it couldn`t end until few months later o year later, so you don´t get appropiate information.
    Example:
    Event          calday        Hours
    10004377  20081120   500        but from event_attr event end date is 20090410.
    In a query filtered by 200811 you get total duration time (500 hours when in 200811 event hours have been 20) or if you filter by any month of 2009 you don´t get information of duration of that event.
    I had to create a copy of standar cube (without calday, only Calendar year/month, Calendar year in time dimension) and disaggrate data creating as many entries for an event as months lasts and adjust calculation of ratios duration of event (duration of event in each month/ total duration of event).
    The question is: Is there any improvement or change on business content in BI 7.0 to treat Training and Event Management data? Has anybody had to deal with that?
    Thank you very much.
    IRB

    Hi,
    TEM data is stored in HRP tables.
    You can load the catalog by creating LSMWs for objects Business event group (L), Business event types (D), Locations (F), Organizers (U) as per requirement.
    LSMW for tcode PP01 can be used to create these objects.
    To create Business Events (E) you can create LSMW for PV10/PV11.
    To book attendee create LSMW for tcode PV08 as here you can specify the actual business event ID which reduces ambiguity.
    tcode PV12 to firmly book events
    tcode PV15 to follow up
    Hope this helps.
    Regards,
    Shreyasi.

  • Training and Event Management Data Load

    Hello Team
    Would appreciate if any of you can advice on how to load Training and Event management data. I think its stored in HRP tables.
    I'm working on an upgrade assignment.
    Thanks

    Hi,
    TEM data is stored in HRP tables.
    You can load the catalog by creating LSMWs for objects Business event group (L), Business event types (D), Locations (F), Organizers (U) as per requirement.
    LSMW for tcode PP01 can be used to create these objects.
    To create Business Events (E) you can create LSMW for PV10/PV11.
    To book attendee create LSMW for tcode PV08 as here you can specify the actual business event ID which reduces ambiguity.
    tcode PV12 to firmly book events
    tcode PV15 to follow up
    Hope this helps.
    Regards,
    Shreyasi.

  • Getting Training and Event Management Data using IT0031

    Scenerio:
    One of the Employee Is Retired. Now we hire it again for the same role ( extending its period after posting it as retired).
    So the good thing that we can use the IT0031 "Reference Personnel Numbers" to get the desired ITs and found that can get other cutomized ITs by checking in the "Copy Infotype" attribute of IT records.
    Now this seems to be valid if we are in the same module
    but waht if i want to get this magic "Referencing of ITs" done for the "Training and Event Managment" Data of the employee.
    Is it Possible Automatically ... or have to go fro ABAP... (I will not prefer ABAP)...
    I hope i have stated the problem clearly ...
    Feedback ... need it ASAP ...

    Hi,
    TEM data is stored in HRP tables.
    You can load the catalog by creating LSMWs for objects Business event group (L), Business event types (D), Locations (F), Organizers (U) as per requirement.
    LSMW for tcode PP01 can be used to create these objects.
    To create Business Events (E) you can create LSMW for PV10/PV11.
    To book attendee create LSMW for tcode PV08 as here you can specify the actual business event ID which reduces ambiguity.
    tcode PV12 to firmly book events
    tcode PV15 to follow up
    Hope this helps.
    Regards,
    Shreyasi.

  • How to store the value of sum of group in Crystal Report at the runtime!

    Hello all,
    I creates a Formula Field that hold the value of Sum of Group in Crystal Report. I would like to know how to store it in a variable and pass it to store procedure. Is it an option in Crystal report to do it. I knew that Crystal Report can cache the report for sharing. My detailed issue as following:
    - Created a Formula Field named TOTAL AMOUNT that calculated the complex expression. This TOTAL AMOUNT is dynamic based on group and variables.
    - I would like to store that value from TOTAL AMOUNT and pass it to the stored procedure parameter IN.
    Any helps are much appreciated. Thanks.

    I doubt that this is possible since it would only calculate this value once the report has data.  This sounds more like a report design question that should be asked over [here|SAP Crystal Reports;

  • How to sort photo events by date and avoid having duplicated photos on iPhone 6+

    How to sort photo events bby date and avoid having duplicated photos. Before the sorting by date worked perfectly by specifying "sort events by date ascending" in iPhoto from my Mac. Now the sorting from iPhoto has no more effect on the iPhones. And photos are often duplicated when synchronisin. Before these problems didn't happen. How to do?

    You can not  --  neither automatically or manually - you should never be in the masters folder and there is never a need to be - iPhoto is a SQLite database and it's database structure is determined by it (and changes from time to time) - use the supported access methods (direct access to the photo files is not supported and never has been) - either using iPhoto or using the media browser in the lower left hand corner of every open/attach/iupload window
    It is CRITICAL that you NEVER make any changes of any sort to the structure or content of the iPhoto library using the finder or any program other than iPhoto
    LN

  • Group by with date range.

    Hi,
    I am looking for effective usage of Group by against date range.
    I have a transaction table as below.
    Date            customer_no      amount_paid
    01-Dec-13     001                  500
    02-Dec-13     001                  360
    09-Dec-13     001                  200
    02-Nov-13     001                  360
    09-Nov-13     001                  200
    02-Nov-13     001                  360
    09-Oct-13     001                  200
    02-Oct-13     001                  360
    09-Oct-13     001                  200
    02-Sep-13     001                  360
    09-Sep-13     001                  200
    ............... etc.
    I would like to see sum(amount_paid) by past date ranges 1-30 days, 31-60 days, 61-90 days.
    Below are expected results.
    Customer          Duration       amount_paid
    001                    1-30             980
    001                    31-60           450
    001                    61-90          1200
    002                    1-30             300
    002                    31-60           490
    002                    61-90           320
    003                    1-30             450
    ......................etc.
    I have to group by customer no and date range (1-30, 31-60, 61-90..etc).
    Can someone help me getting query for this.
    Thanks...
    Sreeram.

    SQL> with t
      2  as
      3  (
      4  select to_date('01-Dec-13', 'dd-Mon-rr') dt, '001' customer_no, 500 amount_paid from dual
      5    union all
      6  select to_date('02-Dec-13', 'dd-Mon-rr') dt, '001' customer_no, 360 amount_paid from dual
      7    union all
      8  select to_date('09-Dec-13', 'dd-Mon-rr') dt, '001' customer_no, 200 amount_paid from dual
      9    union all
    10  select to_date('02-Nov-13', 'dd-Mon-rr') dt, '001' customer_no, 360 amount_paid from dual
    11    union all
    12  select to_date('09-Nov-13', 'dd-Mon-rr') dt, '001' customer_no, 200 amount_paid from dual
    13    union all
    14  select to_date('02-Nov-13', 'dd-Mon-rr') dt, '001' customer_no, 360 amount_paid from dual
    15    union all
    16  select to_date('09-Oct-13', 'dd-Mon-rr') dt, '001' customer_no, 200 amount_paid from dual
    17    union all
    18  select to_date('02-Oct-13', 'dd-Mon-rr') dt, '001' customer_no, 360 amount_paid from dual
    19    union all
    20  select to_date('09-Oct-13', 'dd-Mon-rr') dt, '001' customer_no, 200 amount_paid from dual
    21    union all
    22  select to_date('02-Sep-13', 'dd-Mon-rr') dt, '001' customer_no, 360 amount_paid from dual
    23    union all
    24  select to_date('09-Sep-13', 'dd-Mon-rr') dt, '001' customer_no, 200 amount_paid from dual
    25  )
    26  select customer_no
    27       , ((grp_val - 1) * 30) + 1 start_val
    28       , grp_val * 30 end_val
    29       , sum(amount_paid) amount_paid
    30    from (
    31            select dt
    32                 , customer_no
    33                 , amount_paid
    34                 , ceil(sum(dt_interval) over(partition by customer_no order by dt)/30) grp_val
    35              from (
    36                      select dt
    37                           , customer_no
    38                           , amount_paid
    39                           , nvl(dt - lag(dt) over(partition by customer_no order by dt), 1) dt_interval
    40                        from t
    41                   )
    42         )
    43   group
    44      by customer_no
    45       , grp_val
    46   order
    47      by grp_val;
    CUS  START_VAL    END_VAL AMOUNT_PAID
    001          1         30         560
    001         31         60         760
    001         61         90         920
    001         91        120        1060
    SQL>

  • Grouping with 2 date in sql server

    totle_count
             dt
             name   
    program_id
    1
      1/3/2015
      Tea
    14
    1
      1/5/2015
      Tea
    14
    1
      1/6/2015
      Lunch
    13
    17
    1/6/2015
      Tea
    14
    2
    1/9/2015
      Breakfast
    1008
    39
    1/10/2015
      Breakfast
    1008
    4
    1/19/2015
      Breakfast
    1008
    1
    1/19/2015
      Dinner
    1009
    3
    1/21/2015
       Tea
    14
    totle_count
              dt
    name
    program_id
    1
       1/6/2015 and 1/8/2015
      Lunch
    13
    2
       1/3/2015 and 1/5/2015
      Tea
    14
    17
       1/6/2015 and 1/9/2015
      Tea
    14
    3
       1/21/2015 and 1/23/2015
      Tea
    14
    41  
    1/9/2015 and 1/11/2015
     Breakfast
    1008
    4
       1/18/2015 and 1/20/2015
     Breakfast
    1008
    1
       1/18/2015 and1/20/2015
    Dinner
    1009
    Here is 2 table, 1st is my row table, and I want to group with 2 date.
    Here is 3 days difference. and sum of value is coming.
    2nt table is my expectation table.
    Plz help me for this problem.
    Thanks
    Samir

    I am doing 3 days grouping here
    "dt" is name of date column
    if "dt" column has '1/19/2015' then next in group it will come in "1/18/2015 and1/20/2015"
    any date of 18 or 19 0r 20 it will come in "1/18/2015 and1/20/2015"
    and counting will add between 3 date
    Sorry your posted output is not as per above rule
    How did row for  1/6/2015 and 1/9/2015 got included then. If you group by 3 days you wont get
    this row as 6-9 is 4 days not 3 days
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Issue with syncing bblink calendar + group events calendar into outlook 2003

    Had a BB Curve OS 7, and I was able to sync my default calendar AND my BBM groups calendars in one single sinc.
    Now, I have the Q5 OS 10.2.1 and I can not find for the life of me, how to sync my device calendars (personal and BBM Group Events calendars) onto my pc using Outlook 2003.
    Called my carrier and they don't even know what to tell me. Can someone point me in some direction please!
    PS I would also accept a solution using a cloud calendar (Gmail, Outlook.com...) I just want ALL calendars to be visible from my PC with one combine calandar view.
    2014-02-22 UPDATE: Just installed BBLink 1.2.3, same issue.... No solution yet!

    The OS7 calendar sync ONLY sync's the default calendar. Unless you merged your BBM group calendar entries (you would have had to move them to the default calendar using a special, and little known, documented procedure) into your default calendar you couldn't have had the BBM group calendar sync'd.
    Regardless, the BBM group calendars will not sync to Outlook in BB10.
    1. Please thank those who help you by clicking the "Like" button at the bottom of the post that helped you.
    2. If your issue has been solved, please resolve it by marking the post "Solution?" which solved it for you!

  • Training and Events Master Data Catalog

    Good day,
    The company I'm with currently wants to restructure their Training and Events Master Data Catalog, therefore existing catalog will no longer be applicable from the 01.11.2009 and the new structure to be effective the 01.12.2009. I want to know what is the best possilble way to tackle the "moving" of the old catalog?
    Do we delimit the business event group and all its related activities, i.e. business event group, business event type and the actual business events via transaction S_AHR_61011887? Then change the view settings on PSV2?
    Or can we move the old structure to a different plan version, if yes then how?
    What kind of impact will this change make that I should be aware of?
    Kind regards
    Dorianne

    Best approach would be to delimit and also mark these as "historical". You should not move them to another plan version.
    If you are using Structural Authorizations you should also look at providing only display access for the "Old" a hierarchy.
    thanks

Maybe you are looking for