Grand Totals issue

Hi Gurus,
In My RPD we are using "Count Distinct" Aggregate rule for Facts and in Reports I am using Table level "Grand Total" Enable with "Report Based Total(When applicable)"option also checked...It is working fine for some days..but suddenly it is showing Different Grand totals..and as work around for this I changed Aggregation rule at report level to "Sum"...now it is showing correct values..so my question is Is my work around is correct or not because we used "Count Distinct" as aggregation Rule in RPD and in report level we changed it as "sum"...and also I observed Physical sql when using Grand totals it is summing the values like...sum(Count(distinct fact1))....and when i changed aggregation to "sum" at report level also it is summing the values like..sum(count(distinct fact1)..so please suggest, Is my work around is correct or am I doing any mistake like changing aggregation at report level to get grand total correct?
I am using 10.1.3.4.1...
I also studied in Release notes as it is a bug in this version for this they suggested work around to use<ReportAggregateEnabled>true</ReportAggregateEnabled> in <serverInstance>tag of instanceconfig file this also not working in my environment...

Hi,
I dont' think this is possible for the same measure in a pivot table. Maybe you can use this workaround:
- create an extra column for the measure with a calculation like:
CASE WHEN "Base Facts"."1- Revenue" = MAX("Base Facts"."1- Revenue" BY "Products"."P3 LOB") THEN MAX("Base Facts"."1- Revenue" BY "Products"."P3 LOB") ELSE 0 END
In this example I use the Revenue as the measure. I use the MAX BY function to calculate the MAX value per Product Lob (subtotals per Product Lob in my example). If the max value per product lob is equal to the revenue then the Max value is displayed and otherwise o.
Add this extra measure to the pivot table and add the grand total with aggregate rule = SUM. If you don't want to see the grand total for the original measure select None instead.
Hope this helps. I have a screenshot as well but then I need your emailadress.
Kind regards,
Quinten

Similar Messages

  • Grand Total issue, it won't display...

    Hi,
    Discoverer Desktop 4.1.44
    I have a simple table work sheet showing accno, name, address, balance
    Balance is a calculation, a case statement, so is not held in the database, and it is worked out in the worksheet.
    I want to create a grand total at the bottom of the balance colum but it simply will not show. So if I have 4 records with a balance of £25 each I wpould like to see a grand total at the bottom of £100 but it won't show!
    Is this because disco cannot show a grand total on a calculated field and if so is there any way around it?
    Thanks,
    rg

    Hi,
    You can do a grand total on a calculated column,by just going to tools/totals and then select the column and do a sum and clicking the option at the bottom.There comes your grand total in the report.
    Derry Discoverer 4.1 is outdated and there are many issues concerning it.So better suggestion is upgrade it to the latest version of discoverer 10g where many issues are solved.You can search this forum for upgrading to 10g
    Best Wishes,
    Kranthi.

  • Grand Total Issue - Weighted Sum

    Here's the Issue
    3 Columns
    Hours Worked, Pay Amount, and Pay Rate
    20 10 $.50
    Pay Rate is a calculated column from "Hours Worked" and "Pay Amount"
    I'm trying to add the grand total to my work sheet for "Pay Rate"
    Discoverer simply adds all of the "Pay Rate" values.
    I would like the Pay Rate grand total to be "Pay Amount Grand Total" / "Hours Worked Grand Total"
    Is this even possible?

    If you're using 10g, take a look at your aggregation options (tools/aggregation). Since Pay Rate is a calculated column, there should be an option that forces it to do a calculation on the totals (rather than a total of the calculation). If you're on an older version, you may need to look into the aggregation-related registry settings/preferences. Also make sure you're doing a sum (not a cell sum).
    That behavior seems to change from version to version but if you search on MetaLink you should find some version-specific help.

  • Urgent Grand total Issue

    Hi Experts,
    In my Dashboard has 5 different table report with a Filter option, when I click the clear filter option it affect all the (5) reports.
    1. But I want to clear filter for each reports separately, is it possible means pls tell me how to fix this issue.
    2. Then I want display Grand total at the top of the Table report ie First Grant total then Table report (Usually table report has Grant total is in bottom of that report)
    Thanks in advance
    Balaa...

    1. I donot think this is possible.
    2. This is possible in Pivot but not possible in normal Tabular view. When you click on the 'Sigma' signs there is an option that enables you to specify the position of the Grand Total
    Regards

  • OBIEE 11g Grand total issue

    Hello,
    I have one requirement where I want to show the data as follows
    Type          Metric          Values
    Type1          units          100
              Days          50
              % Calc     10%
    Type2           units          100
              Days          50
              % Calc     10%
    Type3          units          100
              Days          50
              % Calc          10%
    Total units     300
    Total Days     150
    Total % Calc 30%
    If I take grand total of row in pivot table, I am not able to show Total units, Total Days and Total % Calc values in Grand Total because by default, same grand total name appears.
    I want to give different grand total names and percentage sign should appear in grand total.
    Please let me know if u need any more information.
    Thanks.

    Try to recreate the report. Just in case make sure that you dont have null values in that metric or try with ifnull(col,0)
    Check this bug too BUG:9871470
    Keep update

  • Wrong Grand Total in 11g

    Please list out the solutions available to solve the Grand total issue.
    These are the problems Im facing.
    If I enable Grand total I find some rows missing in the report.
    sometimes if i apply any calculations in report(fx) grand total is wrong and again some rows missing.
    These same issues I faced in BISE1 and it is still continuing.
    Any solutions?

    Hi sneha,
    sometimes if i apply any calculations in report(fx) grand total is wrong and again some rows missing.Strange behaviour of missing rows,dint come across this......tell us the exact problem
    These same issues I faced in BISE1 and it is still continuing.How did you solve this issue in BISE1.
    By,
    KK

  • OBIEE Avg Issue on Grand Total

    Hello Experts,
    I'm having an issue while calculating the grand total for the AVG measure.This is the scenario
    1)I have the show count for  the top three tiles for the rolling 13 weeks and only for the weekends and for a particular group of theaters.I have a 13 week indicator and weekend indicator in the filter.
    2) I have the show count to which is using ((showcount/3(top 3 titles))/ 3(3 days in the week)) = ShowCount/9
    3) now when i'm doing the grand total in the pivot rules summation after ,then it is showing sum of all the averages......but this is not my case...my case should be it has to show the avg of all the theaters that are in group of theaters.
    how can i resolve this issue?
    Any help is greatly appreciated.

    Hi User,
    This report is corrupted. You can rebuild or re copy the xml from 10g to 11g and see if it works.
    Thanks,
    Amol
    (Please mark this answer, if you find helpful)

  • Grand total (Report footer) issue in a Report with Group selection.

    Hi,
    The case is simple, i have to summrise the NetValue field of a  report at the Group level and at the Report level(Grand Total).
    I also use a Group selection filter (I have grouped my records by MaterialDesc) to keep the desired groups.
    As you already guessed, my group totals are fine but the grand totals(report footer) contain both filtered and non filtered group records. Is there any way to avoid this problem and get a Grand Total from the filtered group records?
    Thank you.

    You can not use standard summaries with Group Suppression you must use either Running Totals or variables.
    In Running Total  evaluate click theformual button and eneter reverse condition to your group suppression.
    If you can not do that then you must use a Var
    In group footer where total is currently correct place a formula like this and suppress it
    @eval
    whileprintingrecords;
    global numbervar RepTot;
    If ..whatever your suppression condition is not true... then reptot:= reptot + sum( valuefield, groupfield);
    In report footer
    @display
    whileprintingrecords;
    global numbervar RepTot;
    Ian

  • Issue in ALV Grid Grand Totals

    Hi Friends,
       Hwo can i display  grand total text in ALV Grid? Eventhough i am using Totals_text parameter in layout i am unable to display.  any one vcan help me out in this refgard.
    if pos send the code
    Regards,
    Vijay

    <REMOVED BY MODERATOR>
    SAMPLE PROGRAM:
    REPORT ysalesorder_alv_subtotals.
    * Type Pools
    TYPE-POOLS:slis.
    * Tables
    TABLES: vbak, "Sales Document: Header Data
    vbap. "Sales Document: Item Data
    * Global Structures
    DATA:gt_fieldcat TYPE slis_t_fieldcat_alv,
    wa_fieldcat TYPE slis_fieldcat_alv,
    gt_sortcat TYPE slis_t_sortinfo_alv,
    wa_sortcat LIKE LINE OF gt_sortcat.
    * Internal Table
    DATA: BEGIN OF gt_salesorder OCCURS 0,
    vbeln LIKE vbak-vbeln, " Sales Document Number
    posnr LIKE vbap-posnr, " Sales Doc Item
    netwr LIKE vbap-netwr, " Net Value
    END OF gt_salesorder.
    * SELECT OPTIONS
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME
    TITLE text-001.
    SELECT-OPTIONS: s_vbeln FOR vbak-vbeln. " Sales Document
    Number.
    SELECTION-SCREEN END OF BLOCK b1.
    * Initialization
    INITIALIZATION.
    PERFORM initialization.
    * Start Of Selection
    START-OF-SELECTION.
    PERFORM field_catalog. "For Structure Creation
    PERFORM fetch_data. "Get the Data From DB Table
    PERFORM sorting USING gt_sortcat.
    * End Of Selection
    END-OF-SELECTION.
    PERFORM display_data.
    *& Form initialization
    * text
    * --> p1 text
    * <-- p2 text
    FORM initialization .
    s_vbeln-sign = 'I'.
    s_vbeln-option = 'BT'.
    s_vbeln-low = '4969'.
    s_vbeln-high = '5000'.
    APPEND s_vbeln.
    ENDFORM. " initialization
    *& Form field_catalog
    * text
    * --> p1 text
    * <-- p2 text
    FORM field_catalog .
    REFRESH : gt_fieldcat.
    CLEAR : wa_fieldcat.
    wa_fieldcat-col_pos = '1'. "Column Position
    wa_fieldcat-tabname = 'IT_SALESORDER'. "Internal Table
    wa_fieldcat-fieldname = 'VBELN'. "Field Name
    wa_fieldcat-key = 'X'. "Blue Color
    wa_fieldcat-seltext_m = 'Sales Doc No'. "Display Text In Screen
    APPEND wa_fieldcat TO gt_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-col_pos = '2'. "Column Position
    wa_fieldcat-tabname = 'IT_SALESORDER'. "Internal Table Name
    wa_fieldcat-fieldname = 'POSNR'. "Field Name
    wa_fieldcat-seltext_m = 'Sales Doc Item'."Display Text In Screen
    APPEND wa_fieldcat TO gt_fieldcat.
    CLEAR wa_fieldcat.
    *SubTotal on the Field NETWR
    wa_fieldcat-col_pos = '3'. "Column Position
    wa_fieldcat-tabname = 'IT_SALESORDER'. "Internal Table
    wa_fieldcat-fieldname = 'NETWR'. "Field Name
    wa_fieldcat-do_sum = 'X'. "Sum
    wa_fieldcat-seltext_m = 'Net Value'. "Display Text In Screen
    APPEND wa_fieldcat TO gt_fieldcat.
    CLEAR wa_fieldcat.
    ENDFORM. " field_catalog
    *& Form sorting
    * text
    * -->P_IT_SORTCAT text
    FORM sorting USING p_it_sortcat TYPE slis_t_sortinfo_alv.
    CLEAR wa_sortcat.
    wa_sortcat-fieldname = 'VBELN'.
    wa_sortcat-up ='X'.
    wa_sortcat-subtot = 'X'.
    APPEND wa_sortcat TO p_it_sortcat.
    ENDFORM. " sorting
    *& Form display_data
    * text
    * --> p1 text
    * <-- p2 text
    FORM display_data .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    * I_INTERFACE_CHECK = ' '
    * I_BYPASSING_BUFFER = ' '
    * I_BUFFER_ACTIVE = ' '
    i_callback_program = sy-repid
    * I_CALLBACK_PF_STATUS_SET = ' '
    * I_CALLBACK_USER_COMMAND = ' '
    * I_CALLBACK_TOP_OF_PAGE = ' '
    * I_CALLBACK_HTML_TOP_OF_PAGE = ' '
    * I_CALLBACK_HTML_END_OF_LIST = ' '
    * I_STRUCTURE_NAME =
    * I_BACKGROUND_ID = ' '
    * I_GRID_TITLE =
    * I_GRID_SETTINGS =
    * IS_LAYOUT =
    it_fieldcat = gt_fieldcat
    * IT_EXCLUDING =
    * IT_SPECIAL_GROUPS =
    it_sort = gt_sortcat
    * IT_FILTER =
    * IS_SEL_HIDE =
    * I_DEFAULT = 'X'
    * I_SAVE = ' '
    * IS_VARIANT =
    * IT_EVENTS =
    * IT_EVENT_EXIT =
    * IS_PRINT =
    * IS_REPREP_ID =
    * I_SCREEN_START_COLUMN = 0
    * I_SCREEN_START_LINE = 0
    * I_SCREEN_END_COLUMN = 0
    * I_SCREEN_END_LINE = 0
    * IT_ALV_GRAPHICS =
    * IT_HYPERLINK =
    * IT_ADD_FIELDCAT =
    * IT_EXCEPT_QINFO =
    * I_HTML_HEIGHT_TOP =
    * I_HTML_HEIGHT_END =
    * IMPORTING
    * E_EXIT_CAUSED_BY_CALLER =
    * ES_EXIT_CAUSED_BY_USER =
    TABLES
    t_outtab = gt_salesorder
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    IF sy-subrc 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER
    SY-MSGNO
    * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM. " display_data
    *& Form fetch_data
    * text
    * --> p1 text
    * <-- p2 text
    FORM fetch_data .
    REFRESH : gt_salesorder.
    CLEAR : gt_salesorder.
    SELECT a~vbeln
    posnr
    b~netwr
    FROM vbak AS a
    INNER JOIN vbap AS b ON a~vbeln = b~vbeln
    INTO TABLE gt_salesorder
    WHERE a~vbeln IN s_vbeln.
    ENDFORM. " fetch_data
    Edited by: Alvaro Tejada Galindo on Apr 11, 2008 12:24 PM

  • OBIEE 10g - Unable to see data in the report view with grand total applied

    Hi,
    We're facing with a strange issue.
    We're working on a report view.
    We're able to see data when Grand total is not applied on the report. The moment Grand Total is applied, it's showing either an empty table with NULL values or "No Results" page.
    Please help.
    Thanks in advance.
    -Rama

    Hi Dpk,
    Thanks for your reply.
    I included it in the instanceconfig.xml, but the issue still exists.
    Couple of Observations
    #1 - We noticed this issue when we drill down to the level which has really sparse data.
    It works fine when we look at the enterprise wide report.
    #2 - Works fine with few dimensional attributes and facts on the report
    When we add a fact that doesn't have any value at that level, the issue starts to appear.
    Thanks in advance.
    -Rama

  • Condtional formatting on Grand Total in OBIEE 11.1.1.6.7

    Hi,
    We have upgraded a report from 10g to 11g and the report has pivot table which has conditional formatting set on the Grand Total level and is resulting in the following error in OBIEE11g.
    “DXE compiler error. No table 'GTGT' found in DXE. Source name: DxeAPI. XML: None”
    XML Snippet in 10g:
    <saw:condition>
    <sawx:expr xsi:type="sawx:comparison" op="notNull"> 
    <saw:columnRef columnID="xx"/></sawx:expr> 
    <saw:displayFormat fontColor="#FFFFFF" wrapText="true"/> 
      </saw:condition>           
    Equivalent XML Snippet in 11g:
    <saw:conditionalDisplayFormat>  
    <saw:formatRule>
    <saw:condition>
    <sawx:expr xsi:type="sawx:comparison" op="notNull">  
    <saw:columnRef columnID="xx"/></sawx:expr></saw:condition>
    <saw:formatSpec fontColor="#FFFFFF" wrapText="true"/></saw:formatRule></saw:conditionalDisplayFormat>
    Please let me know how to resolve this issue.

    Hi User,
    This report is corrupted. You can rebuild or re copy the xml from 10g to 11g and see if it works.
    Thanks,
    Amol
    (Please mark this answer, if you find helpful)

  • Alv grand total

    hi gurus pls help me on this issue....... i want grand total on each column of this report.
    for example field 'metric-safety'. if possbile try to edit this and send me.
    TYPE-POOLS : slis.
    Tables : Marc, " Plant Data for Material
    Mbew, " Material Valuation
    Ekpo, " Purchasing Document Item
    Eord, " Purchasing Source List
    Zpmt. " Purchasing Metric Table
    Internal Tables Declaration----
    Data : Begin of metric occurs 0,
    matnr like marc-matnr, " Material number
    werks like marc-werks, " Plant
    minbe like marc-minbe, " Recoder Point
    eisbe like marc-eisbe, " Safety Stock
    stprs like mbew-stprs, " Standard Price
    lifnr like eord-lifnr, " Vendor
    menge like ekpo-menge, " PO Quantity
    scalc type p decimals 2,
    safety(20) type c,
    tcalc type p decimals 2,
    Target(20) type c,
    acalc type p decimals 2,
    actual(20) type c,
    ecalc type p decimals 2,
    excess(20) type c,
    ucalc type p decimals 2,
    usafety(20) type c,
    *******Custom table
    inscr like zpmt-inscr, " Inventory Score
    stkot like zpmt-stkot, " Stock Out
    impct like zpmt-impct, " Impact
    nafta like zpmt-nafta, " %nafta
    stscr like zpmt-stscr, " Stock Out Score
    end of metric.
    Data : final like metric occurs 0 with header line.
    DATA: fcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
    **Data : Begin of output occurs 0,
    lifnr like eord-lifnr, " Vendor
    eisbe like marc-eisbe, " Safety Stock
    minbe like marc-minbe, " Re-order Point
    stprs like mbew-stprs, " Standard Price
    sstock(13) type c, " Value of Safety Stock
    Actual(13) type c, " Actual
    Excess(13) type c, " Excess Inv
    underSs(13) type c, " Under Safety Stock
    end of output.
    Data type Declaration----
    Data : a type c value '$'.
    Data : safety(20) type c,
    target(20) type c,
    actual(20) type c,
    excess(20) type c,
    usafety(20) type c,
    repid like sy-repid.
    data : i_pos type i.
    Selection Screen----
    selection-screen : begin of block b1 with frame Title tname.
    Select-options: Mat for marc-matnr, " Material Number Selection
    Plt for marc-werks, " Plant Selection
    Vdr for eord-lifnr. " Vendor Selection
    selection-screen : end of block b1.
    Initialization----
    initialization.
    tname = 'Purchasing Metric Report'.
    At Selection-Screen----
    At selection-screen.
    IF mat = ' ' and Plt = ' ' and Vdr = ' '.
    message e000.
    *elseif mat metric-matnr.
    *message e001.
    *elseif plt metric-werks.
    *message e002.
    *elseif vdr metric-lifnr.
    *message e003.
    endif.
    Start-of-Selection----
    Start-of-selection.
    *******For Data Retrival
    Perform Data_retrival.
    *******For Calculation
    Perform Calculation.
    *******For Building Fieldcatalog
    Perform Build_fieldcatalog.
    *******Alv Display
    Perform Alv_display.
    *& Form Get_Data
    text
    FORM Data_retrival .
    SELECT a~matnr
    a~werks
    a~eisbe
    a~minbe
    b~matnr
    b~stprs
    c~matnr
    c~lifnr
    d~matnr
    d~menge
    into corresponding fields of table metric from
    ( ( ( marc as a inner join mbew as b on bmatnr = amatnr )
    inner join eord as c on cmatnr = amatnr )
    inner join ekpo as d on dmatnr = amatnr )
    where amatnr in mat and awerks in plt and c~lifnr in vdr.
    if sy-subrc = 0.
    sort metric by matnr.
    endif.
    ENDFORM. " Get_Data
    *& Form Calculation
    text
    FORM Calculation .
    loop at metric.
    ******calculation for safety stock ( safety stock * standard price )
    metric-scalc = metric-eisbe * metric-stprs.
    move metric-scalc to safety.
    condense safety.
    concatenate a safety into metric-safety.
    ******calculation for target ( safety stock + standard price )
    metric-tcalc = ( metric-eisbe * metric-stprs ) + metric-stprs.
    move metric-tcalc to target.
    condense target.
    concatenate a target into metric-target.
    ******calculation for Actual ( Po quantity * standard price )
    metric-acalc = metric-menge * metric-stprs.
    move metric-acalc to actual.
    condense actual.
    concatenate a actual into metric-actual.
    ******calculation for Excess Inv ( Actual - Target )
    metric-ecalc = ( metric-menge * metric-stprs ) - ( ( metric-eisbe * metric-stprs ) + metric-stprs ).
    move metric-ecalc to excess.
    condense excess.
    concatenate a excess into metric-excess.
    ******calculation for Under Safety Stock ( actual < safety stock. then actual + safety stock (Else) zero )
    if actual < safety.
    metric-menge * metric-stprs < metric-eisbe * metric-stprs.
    metric-ucalc = ( metric-menge * metric-stprs ) + ( metric-eisbe * metric-stprs ).
    else.
    metric-ucalc = 0.
    endif.
    move metric-ucalc to usafety.
    condense usafety.
    concatenate a usafety into metric-usafety.
    collect metric into final.
    endloop.
    ENDFORM. " Calculation
    *--End-for-Selection--
    *end-of-selection.
    *loop at final.
    *write : / final-lifnr, final-safety, final-target, final-actual, final-excess, final-usafety.
    *endloop.
    *& Form Build_fieldcatalog
    text
    --> p1 text
    <-- p2 text
    FORM Build_fieldcatalog .
    fcat-fieldname = 'LIFNR'.
    fcat-seltext_m = 'Vendor'.
    fcat-col_pos = i_pos.
    fcat-outputlen = 10.
    fcat-emphasize = 'X'.
    fcat-key = 'X'.
    fcat-do_sum = 'X'.
    fcat-edit = 'X'.
    append fcat to fcat.
    clear fcat.
    i_pos = i_pos + 1.
    fcat-fieldname = 'SAFETY'.
    fcat-seltext_m = 'Safety Stock'.
    fcat-col_pos = 2.
    fcat-outputlen = 10.
    fcat-emphasize = 'X'.
    fcat-do_sum = 'X'.
    fieldcatalog-key = 'X'.
    append fcat to fcat.
    clear fcat.
    fcat-fieldname = 'ACTUAL'.
    fcat-seltext_m = 'Actual'.
    fcat-col_pos = 3.
    fcat-outputlen = 10.
    fcat-emphasize = 'X'.
    fcat-do_sum = 'X'.
    fieldcatalog-key = 'X'.
    append fcat to fcat.
    clear fcat.
    fcat-fieldname = 'TARGET'.
    fcat-seltext_m = 'Target'.
    fcat-col_pos = 4.
    fcat-outputlen = 10.
    fcat-emphasize = 'X'.
    fieldcatalog-key = 'X'.
    append fcat to fcat.
    clear fcat.
    fcat-fieldname = 'EXCESS'.
    fcat-seltext_m = 'Excess Inv'.
    fcat-col_pos = 5.
    fcat-outputlen = 10.
    fcat-emphasize = 'X'.
    fieldcatalog-key = 'X'.
    append fcat to fcat.
    clear fcat.
    fcat-fieldname = 'USAFETY'.
    fcat-seltext_m = 'Under Safety Stock'.
    fcat-col_pos = 6.
    fcat-outputlen = 20.
    fcat-emphasize = 'X'.
    fieldcatalog-key = 'X'.
    append fcat to fcat.
    clear fcat.
    fcat-fieldname = 'INSCR'.
    fcat-seltext_m = 'Iventory Score'.
    fcat-col_pos = 7.
    fcat-outputlen = 20.
    fcat-emphasize = 'X'.
    fieldcatalog-key = 'X'.
    append fcat to fcat.
    clear fcat.
    fcat-fieldname = 'STKOT'.
    fcat-seltext_m = 'Stock Out'.
    fcat-col_pos = 6.
    fcat-outputlen = 20.
    fcat-emphasize = 'X'.
    fieldcatalog-key = 'X'.
    append fcat to fcat.
    clear fcat.
    fcat-fieldname = 'IMPCT'.
    fcat-seltext_m = 'Impact'.
    fcat-col_pos = 6.
    fcat-outputlen = 20.
    fcat-emphasize = 'X'.
    fieldcatalog-key = 'X'.
    append fcat to fcat.
    clear fcat.
    fcat-fieldname = 'NAFTA'.
    fcat-seltext_m = '%Nafta'.
    fcat-col_pos = 6.
    fcat-outputlen = 20.
    fcat-emphasize = 'X'.
    fieldcatalog-key = 'X'.
    append fcat to fcat.
    clear fcat.
    fcat-fieldname = 'STSCR'.
    fcat-seltext_m = 'Safety Out Score'.
    fcat-col_pos = 6.
    fcat-outputlen = 20.
    fcat-emphasize = 'X'.
    fieldcatalog-key = 'X'.
    append fcat to fcat.
    clear fcat.
    ENDFORM. " Build_fieldcatalog
    *& Form Alv_display
    text
    --> p1 text
    <-- p2 text
    FORM Alv_display .
    repid = sy-repid.
    *CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_INTERFACE_CHECK = ' '
    I_BYPASSING_BUFFER =
    I_BUFFER_ACTIVE = ' '
    I_CALLBACK_PROGRAM = repid
    I_CALLBACK_PF_STATUS_SET = ' '
    I_CALLBACK_USER_COMMAND = ' '
    I_STRUCTURE_NAME =
    IS_LAYOUT =
    IT_FIELDCAT = fcat[]
    IT_EXCLUDING =
    IT_SPECIAL_GROUPS =
    IT_SORT =
    IT_FILTER =
    IS_SEL_HIDE =
    I_DEFAULT = 'X'
    I_SAVE = ' '
    IS_VARIANT =
    IT_EVENTS =
    IT_EVENT_EXIT =
    IS_PRINT =
    IS_REPREP_ID =
    I_SCREEN_START_COLUMN = 0
    I_SCREEN_START_LINE = 0
    I_SCREEN_END_COLUMN = 0
    I_SCREEN_END_LINE = 0
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER =
    ES_EXIT_CAUSED_BY_USER =
    TABLES
    T_OUTTAB = final
    EXCEPTIONS
    PROGRAM_ERROR = 1
    OTHERS = 2
    *IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ENDIF.
    repid = sy-repid.
    call function 'REUSE_ALV_GRID_DISPLAY'
    exporting
    i_callback_program = repid
    i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
    i_callback_user_command = 'USER_COMMAND'
    i_grid_title = outtext
    is_layout = gd_layout
    it_fieldcat = fcat[]
    it_special_groups = gd_tabgroup
    it_events = gt_events
    is_print = gd_prntparams
    i_save = 'X'
    is_variant = z_template
    tables
    t_outtab = final
    exceptions
    program_error = 1
    others = 2.
    if sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    thx in advance

    hi,
    for subtotal and grand total do the same thing like following,
    DATA: GS_SORT TYPE SLIS_SORTINFO_ALV.
    CLEAR GS_SORT.
    GS_SORT-FIELDNAME = 'FIELD1'.
    GS_SORT-SPOS      = 1.
    GS_SORT-UP        = 'X'.
    GS_SORT-SUBTOT    = 'X'.
    APPEND GS_SORT TO GT_SORT.
    CLEAR GS_SORT.
    GS_SORT-FIELDNAME = 'FIELD2'.
    GS_SORT-SPOS      = 2.
    GS_SORT-UP        = 'X'.
    *GS_SORT-SUBTOT    = 'X'.
    APPEND GS_SORT TO GT_SORT.
    if uesful rewars points

  • Grand total values are not matching with Detail report

    Report has grand totals and when I drill to the detail report, grand total values are NOT matching with parent report totals, I did some analysis but I'm clueless on this issue.
    Please provide your thoughts and insight on this issue..
    Thanks

    is your summary and detail reports hitting different facts, like summary hitting aggregate and detail report hitting it's corresponding detail level fact..?
    if then,
    From Front-end:
    Fix the filter values in detail report that are passing from master report then try delete each columns then check the grand total. If you found your values is matching by deleting particular column then you need to investigate what is the issue around with that dimension table..
    From Database side:
    1. check first aggregate table has proper aggregate data of it's detail..
    2. Take the detail report obiee generated query and try to comment each dimension table and it's corresponding joins to the facts, (before, this delete all the dimensional columns and other measures from select statement and put only that measure where you are getting wrong value, so that you need not to comment all the select and group by columns which saves your time.. ). Need to check by commenting each dimensional wid and it's table from clause, if you found that values is matching then there is some problem with wid columns data population in your ETL.
    Is that BI-Apps project?
    btw, whtz ur name?

  • How to get sub and grand total

    Dear all, I have a report which combines the two totals together and and makes one formula. This formula then is filtered according to Group2 (Reason Code).
    Group 1 is the same Reason Code however with Specified names. Group2 is the same reason code however with ascending order.
    My question is how to make the sub total and grand total of this formula.
    Detailed Information:
    1: Total One - DistinctCount(Order_no),GroupName2 -- In this Total, the records are counted when Linetype = F
    2: Total Two - DistinctCount(Order_no),GroupName2 -- In this Total, the records are counted when Linetype = S
    Formula
    Whileprintingrecords;
    Numbervar x:=0;
    Numbervar y:=0;
    Numbervar z:=0;
    x:={#FOCTC};
    y:={#CREDITTC};
    z:=x+y;
    z;
    Now this formula is placed in the footer of the Group2 (Reason Code).
    What I would like to do is to have a Group2 Sub Total and Finally Grand Total.
    I have tried the Following however it doesn't seem to be working.
    I created another formula exactly like above and placed it into the same Group footer however removed the "Numbervar o:=0;" (The numbervar z:=0; in the above case however when I created another formula I created named the variable "o" instead of "z") so that it does not reset it.
    Then I placed another formula into the Report Footer with the following code
    Whileprintingrecords;
    Numbervar o;
    Any ideas?
    Many thanks
    Regards
    Jehanzeb

    Ok sorted, I used another formula like this.
    Whileprintingrecords;
    Numbervar TJGs;
    Numbervar TotalJobs=0;
    Numbervar CAvg=0;
    TotalJobs := {@TotalFOCCR}; 
    CAvg:= TotalJobs;
    TJGs:=TJGs + CAvg;
    CAvg
    It sorted the issue.

  • Wrong SSAS Grand Total Value Monthly Value base on Weekly Value

    Dear All, 
    I Have calculated measures in my cube base on Weekly and Base on Monthly and different
    Template Base .
    For grand Total Weekly is fine but for Monthly is bad one.
    Say calculated Measure Name "Weekly" with Syntax
    CREATE MEMBER CURRENTCUBE.[Measures].[Weekly]
     AS IIF(isempty([Measures].[Actual Quantity MTD]) or [Measures].[Actual Quantity MTD]=0 or isempty([Measures].[Original Plan Quantity  MTD])   , null ,
    IIF([Measures].[Original Plan Quantity MTD] =0 or isempty([Measures].[Original Plan Quantity MTD]),null,   
    IIF( 
     ([Measures].[Actual Quantity MTD]-[Measures].[Original Plan Quantity MTD]) > 0 , 1 ,[Measures].[Actual Quantity MTD]/ [Measures].[Original Plan Quantity MTD] ))) 
    The Result is good
    here the picture
    http://hpics.li/9fd22f2
    https://drive.google.com/open?id=0ByY5H-XcydgiWGp0RzdWYWp0M2c&authuser=0
    and for Monthly Calculation  it was AVG of Weekly base on Time, Plant, and PSL Dimension 
    My calculated Monthly Measure Name "Monthly" with Syntax
    CREATE MEMBER CURRENTCUBE.[Measures].[Monthly]
     AS AVG ( 
    DESCENDANTS([PSL].[PSL Description])*
    DESCENDANTS([Plant].[Plant])*
    DESCENDANTS([Finish Date].[Calendar],[Finish Date].[Calendar].[Month Year]) 
    , AVG(([Finish Date].[Calendar].CURRENTMEMBER.CHILDREN), [Measures].[Weekly]))
    The Result is Bad on Grand total 
    here the Picture link 
    http://hpics.li/5233b50
    https://drive.google.com/open?id=0ByY5H-XcydgicEhtT1FpekRsbW8&authuser=0
    Please help me why for the Result doesn't same. What do i Miss
    Thank You 
    Yan

    Hi Yan,
    According to your description, you create a calculated measure in your cube, the problem is that grand Total for Monthly is incorrect, right?
    In your scenario, the issue can be caused by that you used "*" and "/" in your calculated measure. In SSAS, one of the most common issues faced in mdx is grand total or sub total not coming properly when some arithmetic operations like
    measure1 [* or + or - or /] measure2 is used, please refer to the link below to see the details.
    http://vnu10.blogspot.jp/2011/01/mdx-grand-total-sub-total.html
    Regards,

Maybe you are looking for

  • Help on Creating Aggregates on MultiProvider

    Hi All, Is it possible to create aggregates on MultiProvider or its possible in Basic Cubes Only. please suggest with that? some document i go through You do not have to create aggregates for MultiCubes. regards babu

  • How do I delete a tv show that I accidentally purchased? It is partially downloaded and takes up too much space on my iPad.

    How do I delete a tv show that I accidentally purchases? It is partially downloaded. It will take up to much space on my iPad. I don't care about the charge for the show- I just want to get rid of it. Thanks

  • ITUNES 9.2 NOT SUPPORTING DRAG AND DROP TO TOAST CORRECTLY

    APPLE is turning into MICROSOFT!!! The new iTunes update to 9.2 may be necessary for iPhone 4 to work but they missed a whole bunch of things. For example when I drag a track from my iTunes window to the desktop I used to see the file on the desktop

  • Reading and Translating

    Hello. I have a file which contains several lines in it. What I'd like to do with it is to read it line by line and see if the line has a particular character in it. (for example, I'd like to find character "&" and replace it with "and" ) After exami

  • An existing folder doesn't appear in the library

    I don't see an existing folder in my library.  I try to import photos into lightroom, but it indicates that they are already imported and they supposedly exist in a particular folder.  However, that folder is not showing in my library.  Is there a wa