Key Figure aggregation settings

Hi Guys,
Currently I have one Key Figure, its settings are:
KF: GOD QTY
aggregation: SUM
exception aggregation: LAST VALUE
aggregation ref char: 0CALDAY.
In the report we have 0CALMONTH in column, so we see last value of the month for the key figure (means whatever last day say 31.08.2009) and not the last value posted say 14.08.2009. In the report see value which is posted on 14.08. but using 0calmonth at report.
Can you tell me how do I change the above KF settings to get the last value posted for the KF? I still want to put 0CALMONTH at report level. What will be the changes at exception aggregation and aggregation ref char?
Thanks in advance,
BMW Z4.

The exception aggregation of LAST VALUE on calendar day will take the last value of the calendar day that your dataset is restricted to. So if you are drilling across by 0CALMONTH, each column will take the GOD QTY value of the last Calendar Day of each month.
You could possibly get around this creating your GOD Qty Key Figure in your report as a selection or RKF and choosing the 'Constant Selection' option on the Advanced Tab - with this setting the selection becomes independent of the filter settings. So you may be able to set this as the last value and it will take this value for all columns.
Nick

Similar Messages

  • InfoSet in SAP BI 7.10 and Key figure aggregation

    HI SAP Gurus,
    I am new in SAP BI area. I have my first problem.
    I want to create a report for the profit of goods. 
    The cost of goods(cogs) are constant for each material for one month.
    The formula to calculate the profit of goods = sales turn over u2013 cogs of month *sales amount.
    I have defined in BW time dependent infoObejct with attribute cogs.
    I have 2 info Sources.  InfoCube for transactional sales data from R/3 and material cogs master data loaded from csv file each month to infoObject.
    The info Provider for report is InfoSet (transactional Cube and cogs infoObject) .
    My problems are
    1) When I create an InfoSet, SAP BW create automatically new technical name for all characteristics and key figures and the first technical name should be alias fr each InfoCube and InfoObject in the InfoSet.
    2) The new technical name infoSet erased my aggregation references characteristic (=calmonth)
    3) In the report the key figure cogs was aggregated for each customer sales and customers,    that means the value of cogs is not constant, when it is aggregated according to customer sales order.
    Thanks a lot for your support
    Solomon Kassaye
    Munich Germany

    Solomon find some code below for the start routine, change the fields and edit code to suit your exact structure and requirements but the logic is all there.
    4) Create a Start Routine on the transformation from sales DSO to Profit of Goods InfoCube.
    Use a lookup from the the COG DSO to populate the monthly COG field in the COG DSO.
    **Global Declaration
    TYPES: BEGIN OF I_S_COG,
    /BIC/GOODS_NUMBER TYPE /BIC/A<DSO Table name>-/BIC/GOODS_NUMBER,
    /BIC/GOODS_NAME TYPE /BIC/A<DSO Table name>-/BIC/GOODS_NAME,
    /BIC/COG TYPE /BIC/A<DSO Table name>-/BIC/COG,
    /BIC/PERIOD TYPE /BIC/A<DSO Table name>-/BIC/PERIOD,
    END OF I_S_COG.
    DATA: I_T_COG type standard table of I_S_COG,
    wa_COG like line of i_t_COG.
    *Local Declaration
    data: temp  type _ty_t_SC_1.
    *move SOURCE_PACKAGE[] to temp[].
    temp[] = SOURCE_PACKAGE.
    select /BIC/GOODS_NUMBER /BIC/GOODS_NAME /BIC/COG /BIC/PERIOD  from
    /BIC/A<DSO Table name>
    into corresponding fields of table i_t_COG for all entries in
    temp where /BIC/GOODS_NUMBER = temp-/BIC/GOODS_NUMBER.
    sort i_t_COG by /BIC/GOODS_NUMBER.
    loop at SOURCE_PACKAGE assigning <source_fields>.
    move-corresponding <source_fields> to wa.
    loop at i_t_COG into wa_COG where /BIC/GOODS_NUMBER =
    <source_fields>-/BIC/GOODS_NUMBER and /BIC/PERIOD =
    <source_fields>-/BIC/PERIOD.
    modify SOURCE_PACKAGE from wa transporting /bic/COG.
    endloop.
    endloop.
    5) Create an End Routine which calculates Profit using the formula and updates the result set with the value in the Profit column.
    Given your requirement for the profit calculation
    profit of goods = sales turn over u2013 cogs of month * sales amount
    Write a simple end routine yourself
    *Local Declaration
    loop at RESULT_PACKAGE.
    <result_fields>-profit = <result_fields>-sales turn over - <result_fields>-COG * <result_fields>-sales amount.
    modify RESULT_PACKAGE from <result_fields> transporting profit.
    endloop.
    As the above start and end routines are used to enhance your sales DSO, your fields for customer number and the sales order should already be in your DSO for drilldown.
    Let me know how you get on.

  • Non Cumulative Key Figures Aggregations

    Hello Forum.
    This is regarding results of non-cumulative keyfigures.
    We have a non cumulative keyfigures whose aggregation behaviour is SUM with exeception aggregation as LAST.
    Now out inflow kefigures has the value : 700 and outflow has 164 but on query the non cumulative keyfigure displays 1415 which is correct.
    Can anyone plz tell how to check this aggregations because for few other records we have incorrect values.
    Thanks & Regards
    Ashish

    non-cumulative keyfigures can be interpreted as follow:
    KF = Current value + inflow - outflow
    in yr case exceptional aggregation is set as LAST , so for a given transaction data KF will be evaluated as LAST value of the aggregation
    let me explain this with an example :
    for a given material , KF is calcluated as summation of KFs for another char (eg Material Type) of the same material. =>Current value = KF + KF + KF (for three diff mat type)
    At Query run time KF will be calculated as KF = Current value + inflow - outflow...
    now in query we will be having more KFs:
    KF  Current value1 + inflow1 - outflow1 (=Current Value2)   for mat typ1
    KF  Current value2 + inflow 2- outflow2   (=Current Value3) for mat typ2
    KF  Current value3 + inflow3 - outflow3   (=Current Value4) for mat typ3
    the above will be interpreted internally and query will show result Current Value4 (because exceptional aggregation is LAST=>pls note that Exp aggregation runs at Query run time)
    Its a bit tough to under the concept but u have to keep little patience ...

  • Non Cumulative Key Figures Simple

    Please Help me with this.
    I have the measurement Amount "0meas_value" non cumulative key figure and
    aggregation properties Sum and Last value and other key figure is 0meas_chg
    cUMULATIVE KEY FIGURE. aggregation properties Sum and summation. Now my question if I map the field from R3 Datasource (MEASVALUE) to CUMULATIVE key figure 0meas_chg, will it me a mess??? , Since when i try to put "0meas_value" non cumulative key figure in infosource it gives the error that you cannot put the non cumulative keyfigure in infosource. Please tell how can i then map to non cumulative key figure.?? and if I do not map what will be the problem??
    <b>Technical name: 0MEAS_VALUE (Non Cumulative)</b>
    Use
    This key figure contains the measurement amount of a real estate object on a given key date. The key figure is used for analyzing changes to the real estate portfolio.
    and
    <b>Technical name: 0MEAS_CHG (Cumulative)</b>
    Use
    This key figure contains the change to a measurement on a given key date. The key figure is used for analyzing changes to the real estate portfolio.
    Technical Data
    Aggregation
    SUM
    Exception Aggregation
    SUMMATION
    Cumulative/Non-Cumulative Value
    Cumulative value
    Thanks
    Soniya

    This kind of issue is difficult to analyze.
    Basic approach would be:
    1. make sure your BIA revision is the latest.
    2. check Tcd: RSDDBIAMON2 and make sure there is no red light
    3. rebuild the BIA Index and try again.
    Regards,
    Patricia

  • Aggregation ---Settings of KF(Key Figure) in Query Designer

    Hi,
       What is the impact of the following setting in the query result
    Query Designer>KF Definition>Edit-->Aggregation (TAB)
    Exception Aggregation-->MAximum and
    Ref Characterstic
    Thanks

    Hi,
    To enable the calculation of key figures, the data from the InfoProvider has to be aggregated to the detail level of the query and formulas may also need to be calculated. The system has to aggregate using multiple characteristics. In regard to a selected characteristic, the system can aggregate with another rule for each key figure (exception aggregation).
    http://help.sap.com/saphelp_nw04s/helpdata/en/75/21054da1392649948e5b94e4fc4bce/frameset.htm
    Exception aggregation ?
    http://help.sap.com/saphelp_nw04s/helpdata/en/43/53717c223a1bcde10000000a1553f7/content.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/47/4d6d902dbb22c5e10000000a42189d/content.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/47/5dfdca3ea9427fe10000000a42189d/content.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/d2/e0173f5ff48443e10000000a114084/frameset.htm
    Rgs,
    I.R.K

  • Key Figures and Aggregation options

    Hi All,
    There are three aggregation options:Minimum,Maximum,Sum on the Aggregation Tab when creating a Key Figure  on the Admin Work Bench. I understand that these aggregation rules are set for the Key figure BEx default settings. Does this affect at all how the data is loaded into the cube?
    Another question. If I have a Key Figure that I have set to Maximum, and would like to change to Sum.. Do I need to unload the data in the cube and load it again?
    Thanks.

    > There are three aggregation
    > options:Minimum,Maximum,Sum on the Aggregation Tab
    > when creating a Key Figure  on the Admin Work Bench.
    > I understand that these aggregation rules are set for
    > the Key figure BEx default settings. Does this affect
    > at all how the data is loaded into the cube?
    Indeed: these are report relevant settings only.
    > Another question. If I have a Key Figure that I have
    > set to Maximum, and would like to change to Sum.. Do
    > I need to unload the data in the cube and load it
    > again?
    I'm not sure about this one: Since it's a report-relevant setting only, i wonder there would be a reason why all the cubes where the KF is used should be empty...
    (you can always change the setting directly in table RSDKYF, field AGGRGEN)

  • Returns capture and Key figure settings

    Hello Experts,
    I have a scenario like this for my history capture process.
    I have sales order history of 10 for the month of September.
    Now I have the returns of the same month for the same product 12.
    How will this be captured in DP? Will it be captured as -12 or 12?
    I expect the aggregated demand to be 0 and not -2.
    Is there a possibility to do this in the key figure settings or should i code this in Update rules.
    Thanks,
    Suresh

    HI,
    Option 1 :
    If your are using an info cube, then it would make sense to update the values directly in the update rules or transformation rules for that particular key figure and then load it into the planning book key figure directly.
    Second OPtion  :
    If you have an option to add another key figure just add another key figure saying returns and you don't have to add it to the planning book view, so it remains int eh background and then you can write a macro to update the actual key figure with the difference using this key figure, this way you will have record of both the return values in the background or you can even display it if you want, and also the remaining difference in the history.

  • BEx Query - Stop Aggregation of Key Figure upon Drill

    Hi,
    I have a situation wherein I am joining Header and Line Item details using a BW InfoSet (Header - DSO1 and Line Item DSO2). A query is built off this InfoSet providing a single view of both the Header and Line Item information. This works great and users love it. Note that this information is coming from a 3rd part application sitting in ECC and is data before posting into SAP.
    Using BEx Analyzer, we have Header and Line Item fields in the rows along with the Line Item Amount and the Header Amount. If I remove the Line Item characteristics from the rows, the Amounts get aggregated(SUM UP). This is OK for the Line Item Amount (sum up all the different lines), but not so good when the Header Amounts sum together providing an incorrect header amount.
    Ex: Document Number 123 has 3 distribution lines. Total Header Amount is $100.
    Doc Number(DSO1) |     Line Item Number(DSO2) |      Line Item Amount(DSO1) | Header Amount (DSO2)   
    123                                   1                                             $20                                   $100                      
    123                                   2                                             $20                                   $100                      
    123                                   3                                             $50                                   $100                      
    This view looks good. Say, we remove Line Item Number from the rows, we now get:
    Doc Number |      Line Item Amount  |      Header Amount
    123                              $90                       $300                       
    The Header Amount is incorrect as it should be $100.  My initial plan was to use Line Item Amount as it would aggregate up and provide the detail at the line item level and sum up to the header level.
    As this information is before posting into SAP. None of the SAP validations are called up for this data and the sum of the line item amounts will not always tie to the header amount  (there could be tax and freight amounts at the header level in different key figures). As seen in my example above, Line Item Amount sum up to $90 whereas the Header Amount is $100.
    I guess the simplest solution would be to set the Header Amount on this report to not change with any navigation/filtering etc. As in the example, the header amount remains $100. Any way this can be achieved?
    Any ideas/suggestions are welcome. Thanks in advance.
    -Vivek

    Hi Yasemin,
    Thank you for the prompt reply. I like your idea of counting line item numbers and dividing the header amounts with the count. For my situation though, Akshay and Anshu's answer worked best and like the fact that I can leverage BEx functionality out of the box.
    Akshay & Anshu,
    Thank for the prompt reply. Your suggested solution worked great.
    Many Thanks,
    Vivek

  • Exception aggregation on Non-cumulative key figure

    Dear experts,
    I have a problem. We have an InfoCube in BW in which the Activity Journals are loaded every day. In this Activity Journals it is registered that a Material was listed (available) at a customer (value 0 or 1).
    We have a non-cumulative key figure MXW_LISTN with inflow (MXW_LISTI) and outflow (MXW_LISTO). In time this key figure receives +1 or -1 for a customer, material combination.
    I want to use MXW_LISTN in the query in a specific way. The key figure on itselve tells me how many listings there are. However, I want to know how many business partners there are with a listing.
    I was thinking about an exception aggregation on MXW_LISTN with reference characteristic 0BPARTNER and "Count <> 0". BW however refuses to do so and only lets me do simple aggregations such as AVG, MIN, MAX etc.
    Can you think with me and come with an proper solution to count the number of business partners with a listing?
    Your help is very much appreciated and rewarded!
    Best regards, Hans de Klein

    Maybe a solution with virtual key figures is an option?
    Please help me out!
    Best regards, Hans de Klein

  • How to avoid aggregation on a key figure

    Hi SDN,
    Is there a way to avoid aggregation on a key figure? We have a situation where we have multiple records for a particular order/item. So a key figure like Net Price simply adds up which is wrong. We just want to repeat it and not aggregate.
    Any solution?
    Thanks for the help.
    SM

    Hi,
    Try this,
    in InfoObject Aggregation Tab:
    Aggregation :SUM
    Exception Aggregation: No Aggregation (X, If more than one records Occurs).
    else try with more than one value
    Regards
    Reddy A

  • Calculated key figures from multicubes before aggregation

    Hi,
    I am calculating a total using a calculated key figure
    that has one key figure from a multicube and two other key figures from another multicube.
    Also I factor the total using a variable with a replacement path on the dummy attribute (Constant) to "force" the calculation at the material level.
    Cost = Cost(CUBE1) / Quantity(CUBE1) * Quantity(Cube2) * ZVRMATER1
    Problem:
    If I split the calculation this works before aggregation at the material level. Also this works fine using calculations that use key figures that must be calculated before aggregation if they all are from the same cube at the time.  The required formula above will not work (zero divide) since during selection the OLAP processor retrieves in phases and with value 0 from the key figure of CUBE2.
    Any suggestion on how to solve this without new back-end development?
    Thanks.

    Hi,
    I am calculating a total using a calculated key figure
    that has one key figure from a multicube and two other key figures from another multicube.
    Also I factor the total using a variable with a replacement path on the dummy attribute (Constant) to "force" the calculation at the material level.
    Cost = Cost(CUBE1) / Quantity(CUBE1) * Quantity(Cube2) * ZVRMATER1
    Problem:
    If I split the calculation this works before aggregation at the material level. Also this works fine using calculations that use key figures that must be calculated before aggregation if they all are from the same cube at the time.  The required formula above will not work (zero divide) since during selection the OLAP processor retrieves in phases and with value 0 from the key figure of CUBE2.
    Any suggestion on how to solve this without new back-end development?
    Thanks.

  • Calculated key figures before aggregation

    Hi,
    I'm having trouble creating a new calculated key figure. Here's the situation.
    I have two key figures: stock, value A. Now I want to create a new calculated key figure (in 3.x) using both key figures. The calculation would look something like: "stock * (value A == 0)". Now I want this key figure to work before aggregation. When creating this calculated key figure however I am unable to set the aggregation setting to before aggregation. Now, with any other key figure besides stock, this is no problem. Something like "profit * value A == 0)" works fine and I can set the aggregation setting to before aggregation. I suspect the reason I can't use stock in a calculated key figure set the calculate before aggregation is because of the exception aggregation of the stock key figure. It's set to last value in exception aggregation.
    Does anyone know how to solve this problem? Thanks in advance.
    Alex

    Hi Alex,
    please read this:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/75/21054da1392649948e5b94e4fc4bce/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/80/1a62f8e07211d2acb80000e829fbfe/frameset.htm
    The reason that somtimes the propertie is available or not depends on the key figure type - e.g. if it is complex or not. I think that here is a lot of info available in the forum.
    Regards,
    Adem

  • How to calculate key figure before aggregation for complex formular?

    Hi, buddies
    <b>Here's the simplified senario</b>:
    I have a cube, in which the characteristics are 'Calendar Day' and 'Hour' (values are 01~24), and the key figures are stored by day and by hour.
    What I need is very simple, a query to display calculated key figures only by Calendar Day. I don't need Hour information.
    So I create a query: column charact is Calendar Day, rows are several calculated key figures.
    <b>Now the problem is that</b>:
    if I don't put 'Hour' as row in the query, I'll get WRONG result. But if I put 'Hour' as row in the query, I'll get CORRECT result, but all the 'Hour' details will display, which should be hided.
    <b>I know the reason is that</b>:
    the calculated key figure that I create should be calucated before aggregation, not after. But since the formular is pretty complex, I can't change the 'Time of Aggregation Calculation' in key figure's property. (It's greyed out.) So I have to put 'Hour' as row in the query to force calcuation 'before aggregation' in query and set the property 'Calculate Result As...' as 'Summary'.
    <b>My question</b> is:
    whether there's any other way to force calcuation 'before aggregation', so I don't have to put 'Hour' in the query.
    If no, is there a simple way to hide the 'Hour' details and only display summary result ON THE QUERY LEVEL? (
    <i>I can hide detail lines by using web template, or maybe using VB in excel. But I can't use either of them. I want to hide the details on the QUERY LEVEL. So I can use the query directly in any other reporting tools, like Visual Composer.</i>)
    Any idea?
    Wei

    Hi, Sudeepta
    Thanks for your reply.
    I did try to set 'No display' for 'Hour'. The result is that the Characteristics 'Hour' doesn't appear on the query result, but the detailed line of key figures still display on the result. It looks like the followings: (I put summaries on the top/right)
    Date  1/1  1/2  Overall result
    KPI1    10        11   22  (sum line)
    KPI2    20        21   41  (sum line)
    KPI1    12        13   25  (detailed line)
    KPI2    13        13   26  (detailed line)
    KPI1    11        12   23  (detailed line)
    KPI2    12        12   24  (detailed line)
    I want to suppress all the detailed lines and leave sum lines on the result.

  • Key figure with pre-calculated aggregation

    Hello,
    I have to model a key figure with a pre-calculated aggregation, that is, soruce flat files contain explicit values for months, quarters, halfyears and years. The key figure is a percentage (service quality) and the corresponding company department provides me with results for all aggregation levels.
    I think that this case can be modeled with one InfoCube for each aggregation level and a Multicube but I have to create a high number of InfoCubes (aprox. 180).
    I can get the formula that department uses, but it's possible on BW to change standard aggregation (SUM, MAX, MIN)?
    Thanks in advance and regards,
    Alberto Garcia.

    Hi Alberto,
    One of the ways of doing it could be -
    add another field (char) to your cube called at "value Type" & assign different values to it depending upon the time value.
    say Monthly  - value type 1
        Querter  - value type 2
    & so on ...
    keep filling the same key figure.
    at the time of reporting restrict your key figure accordingly with the value type. ( say need only montly key figure value restrict value type to "1")
    hope it helps.
    VC

  • Use of Aggregation tab of key figure

    Hello Gurus ,
    Please tell me use of Aggregation tab of key figure , and where it affects ?

    hi,
    check the below links for aggregation and with examples..
    http://help.sap.com/saphelp_nw04s/helpdata/en/47/607899dcce6834e10000000a421937/frameset.htm
    To enable the calculation of key figures, the data from the InfoProvider has to be aggregated to the detail level of the query and formulas may also need to be calculated. The system has to aggregate using multiple characteristics. In regard to a selected characteristic, the system can aggregate with another rule for each key figure (exception aggregation).
    During aggregation, the OLAP Engine in BI proceeds as follows:
           1.      First, standard aggregation is executed. Possible aggregation types include summation (SUM), minimum (MIN) and maximum (MAX). Minimum and maximum can, for example, be used for date key figures.
           2.      Aggregation using a selected characteristic occurs after standard aggregation (exception aggregation). The available exception aggregation types include average, counter, first value, last value, minimum, maximum, no aggregation, standard deviation, summation, and variance. Application cases for exception aggregation include warehouse stock, for example, that cannot be totaled over time, or counters that count the number of characteristic values for a certain characteristic
    assign points if helpful
    regards
    vadlamudi

Maybe you are looking for

  • ValueChangeListener not invoked inside h:dataTable h:inpuText

    Hi, I'm creating a simple dataTable with an inputText in each row. Each inputText has a valueChangeListener that is never invoked. Does anyone know why this is happening ? Thanks in advance, - Juan

  • Buying music while being abroad

    Hello, I live in Canada, but am working in a country which does not have an iTunes Music Store. Can I still buy music from the Canadian iTunes Music Store? My credit card is Canadian (but had to change my billing address to here). Thanks! Paul

  • Issue with F.03

    Hello Guru's i have a issue iwth F.03, when i executed this tcode it the report it displays that  difference occurred on teh following accounts during the reconciliation of indexes transaction figure master debit will not agree with credint how to fi

  • After boot net-tpe - install sparc20 loses connection

    I'm trying to install Solaris 8 on a Sparcserver 20. Due to a defect cdrom, I've to use a jumstart install. The jumpstart-client (the Sparcserver 20) finds it's own ip-adress and retrieves the bootblock(?) When I use snoop on the server, I can see th

  • BPEL process Import

    Hi Experts, Is it possible to convert/import the ORACLE/BIZTALK/BEA BPEL process into XI without any modification? The below link document assures that, its possible from ARIS. Could you please tell me for the other platform? https://www.sdn.sap.com/