Calculated Key Figures - Result row sum is wrong

Hello all,
Using the example below, I built a calculated key figure for TotalPrice (material amount * material price per unit).  I set TotalPrice to calculate the result as a "total".
OrderID OrderLineID MaterialID Quantity PricePerUnit    TotalPrice
1                 1                1            1              5.00           5.00
1                 2                2            1              3.00           3.00          
2                 3                1            2              5.00          10.00
2                 4                2            1              3.00           3.00
3                 5                2            3              3.00           6.00
ResultRow:   -                 -            7            19.00          27.00        
Now, if I remove OrderLineID and MaterialID drilldown (or from the query rows), I get the following (wrong) results for TotalPrice:
OrderID Quantity PricePerUnit TotalPrice
1                 2              8.00         16.00*
2                 3              8.00         24.00*           
3                 3              3.00           9.00*                   
ResultRow:  8             19.00         39.00* 
- wrong results
Is it possible to be able to remove the orderlineid and materialid fields from the query rows and still get correct results for TotalPrice?
Thanks!
-B

I solved the problem by adding an Exception Aggregation to the TotalPrice calculated Key Figure. 
To be more specific, I added an Exception Aggregation (set it as type "Total"), then set the reference characteristic to OrderLineID.
As a result, the exception aggregation takes into consideration the orderlineID row when calculating the total price (quantity * priceperunit).  Therefore if you place the orderlineid in the free characteristics instead of the query row, the calculation is still performed correctly.

Similar Messages

  • Calculated key figures, results and grouping!!

    Hi,
    I'm working on a workbook with several sheets, the first of them contains the detail and also several result lines (Discipline, material group and material), the second one has a resume (Discipline and material group), etc.
    In the first and second sheet  I have a calculated key figure, but the result has a problem because I don't want to formulate it on the result, instead I need the summarization (total of  amounts by material), this problem is already solved by changing the calculate result as summation. But now I'm facing a new problem, when I try to see the resume report (2nd sheet) by material group I don't need the Calculated Key Figure, what I need are the summation and total result showed on the first sheet.
    One option I've been thinking of is to show the query on the first screen and hide the detail lines and just show the result and the summation lines; is this option ok? Do you have any other ideas?..
    Thank you very much for all the help you can bring me,
    Waiting for yours answers!!

    Hi,
    The best way to show only the summation by refering through cells. I mean the second option would be best.
    Message was edited by: AVR - IGA

  • Calculated key-figures are wrong in result rows

    Hi,
    I developed a BEx query which shows profi-centers and materials in the rows, and the price, the amount and the amount-value in the columns.
    Price and amount are basic key-figures on the cube, the value is calculated via a calculated key-figure in the query (price*amount).
    Now I have added result rows an profit-center level in the workbook. Everything works fine, BUT when I hide the materials, the result-row on profit-center level is calculated wrong.
    Is there any possibility to hide the material-lines without having the resul-rowts calculated wrong? Is there any feature like "caculate material in background but hide in the workbook"?
    I don´t like to create other basic key-figures on cube level, as this is only an example for lots of calculated key-figures which I use.
    Thanks for your help,
    Patrick

    Hi Patrick,
    Since the prices and amounts are on the material level, therefore the calculation for amount value will be correctly done only when you have materials in the rows.
    Now when you hide the materials, then the system would not know on what basis to do the calculation: I'll explain with an example.
    Let's take four materials which have the same profit center assignment. But the prices for each of them are different and so are the amounts. Now if you remove the materials from the rows, then say the system calculates amount-value by taking the average price and multiply that with the total amount of the four materials. That would also give an incorrect result - isn't it?
    So there is no way to define what the system should do when material is removed from the rows.
    So material would be the minimum required granularity for such a report to show correct results.
    Regards,
    Shweta

  • Using the function SUM() in a calculated Key Figure

    Hi All,
    I need to create a calculated Key Figure and am looking for the function SUM().Can you please let me know where this is present.I have checked under the "Data Functions" and it does not seem to be present there.
    Thanks
    Aravind Pattabiraman

    Hi,
    Make use of aggragation property of the keyfigure, for summing the values of that KF.
    Regards,
    Rajkandula

  • Exception aggregation for calculated key figure

    Is it possible to have exception aggregation for calculated key figure in BW 3.5? As per Note 1151857, it is possible, however this note applies to BI 7.0.
    As per note 152638, it is possible in older version only simple ckfs like 'CKF = Base key figure'.
    Is there any workaround to define exception aggregation for complex CKFs in BW 3.5?
    My requirement is like this -
    CKF = (sales quantity - forecast) %share (sales quantity).
    Aggregation for CKF over time should be sum whereas, for all other characteristics calculation of CKF should be done after aggregation(normal scenario).
    So, defining exception aggregation of CKF as 'Summation' over time should fulfil my requirement.
    I can not use calculate result as 'summation' setting for CKF because of following design of report.
    Report contains structure(characteristic)
    Elements of structure are -
    Last 3 months(April - June)
    Last 3 months - 1 (Mar - May)
    Last 3 months - 2 (Feb - Apr)
    and so on...
    When data is aggregated for each element of structure, base KFs will be aggregated and calculations will be done on that.
    Changes in the backend are also not possible because, normal aggregation of CKF-alike in backend will be summation for all characteristics.
    Is there any way in BW 3.5 to model such a scenario?
    Thanks and Regards,
    Anup Kulkarni

    Sum of individual values of CKFs is not same as the Calculation on 'sum of basic key figures(result of basic key figures)'.  - Yes, you are right.
    I need to aggregate CKF over time as SUM. However, calculation for result of all other characteristics should be based on results of basic key figures and not the 'Sum of individual values of CKF'.  -
    What i understood is that whenever the time char is in row, then result should be simple on the sum what ur getting but when other char are there then it should go for calculation based on the sum of key figure.
    If im not wrong in getting ur point.
    How can two differenct activites be perofrmed on same key figure depending on the characteristic .....!. For this u have to think some other possibility or let somebody else update the thread.

  • Calculated Key Figures Issue!

    Hello Experts -
    I'm getting error messages for the calculated key figures. The message says that the key figure is not defined correctly. Therefore, I started breaking down the calculated key figures and use them in the eventual calculated key figure. I have included all the calculated key figures. And I've hidden the ones that I dont need to show in my query result. I'm in BI 7.0. Also, I had to remodel my multi-provider after making the initial query. Do I have to start fresh?
    I have the following calculated key figure:
    1. Price = (Price > 0) * Price + (Vendor Price - (Vendor Price * (Cust Discount + Vendor Discount)))
    This is supposed to be an if calculation. If Price is greater than 0, then Price else the calculation.
    Cust Discount and Vendor Discount are CKFs.
    What am I doing wrong?

    Thanks Ajay!
    I added a couple of NODIMs and the query is now working!
    I have couple more questions:
    1. Is there a way to say Not Null in Bex? In my if condition, I want to say if Price is not equal to NULL instead of greater than 0.
    2. The above requirement leads me to another question: how do I account for the negative values. I mean I need to add them but I cannot suppress them? I hope it makes sense!

  • Calculated Key Figures Decimal Place Error

    Hi Experts,
    Wonder if there is anybody to help me out to explain why I am having a problem on the calculated key figures decimal places when if I report on the components of the calculated key figure (restricted key figure) are working correctly?
    The calculated key figure is a boolean formula made up of 2 restricted key figures.  The 2 restricted key figure are having 2 decimal place (one is 0.36 another is 0.00).  In the current condition, the 2 restricted key figure just sums up - 0.36 + 0.00 = 0.36.  However the calculated key figure displayed as 0.359999 (6 decimal places) as the result.
    I am using BEx Analyzer Excel.

    Hi Fang,
    right mouse click on your KF and select properties. Then define the number of decimal places you want.
    Ciao.
    Riccardo.

  • Global calculated key figures and their descriptions

    Hi, I currently have a strange problem concerning calculated key figures.
    We have several global calculated key figures which are used in approx. 100 querys. These key figures have a custom description ( not the same as the underlying keyfig info object).
    When we use the calc. key figures in querys we let them take the description from the global key figure (the box 'use Standard text' is checked). When we execute the query, the description of the calculated does not show. As soon as we uncheck the box 'use Standard text' (and thus use 'local' -query level- descriptions) the description does show. Offcourse this is not a solution but merely a workaround, we want the key fig to take its description from the global key figure.
    The problem as described above only occures on one of the two development environments. The environment on which the problem occures has support package skw70018(nwv st 16), the environment on which the problem <u>doesn't</u> occure has support package skw70013.

    Execute the content at Infoprovider level as below
    Div Team A B C
    A X 2 1 6 9
    A Y 4 2 9 15
    Result Row 6 3 15
    If you get same desired result in Infoprovider .. it should come in Report ... Run the report in RSRT (Without cache)
    How you built the MP based on single cube or 2 ? Display content in MP for above critieria ... to cross check the report
    check the idenfication ... is marked to which cube ?

  • Using Characteristic in Calculated key figure

    Hello every one,
    I need a help. Can anyone help me in solving one requirement.
    I want to know if i can use a Characteristic in calculated key figure.
    Thanks in advance.

    Hi,
    You can try to create a formula variable of type replacement path and supply this char to pull the value from. Evaluate this value as a boolean (1 or 0 for if there is a value or not). Then you can create a new formula using this formula variable and your CKF. If the result is 1, then you get the value of the CKF, or if the indicator returns 0, then you get 0 as the result.
    Hope this helps...

  • Currency translation problem for calculated key figure

    Hi All
    I have a problem with the currency translation for a calculated key figure.
    I have a requirement to show the MM consignment stock value in the specified currency from the selection screen.
    For consignment stock, there is no value maintained in the system. So for this we need to calculate the value as below
    Restricted key figure: RKFConsignment stock: Total stock with special stock indicator restriction "K"
    Calculated keyfigure: Consignment stock value = Nodim( RKFConsignment stock) * (Standard cost / price unit).
    Here, in the calculated keyfigure properties --> I have used a currency translation for the 0CALMONTH.
    The query has selection on the 0calmonth.
    But in the result the I am getting unexpected results.
    Do we have any inconsistencies in the currency translation on the formulas?
    Please help me on this.
    Regards
    S.R

    Hi All
    I have noticed something. I changed my query date selection to Calendar day - Keydate instead of calendar month.
    And I have changed the currency variable to fixed exchange rate "CHF", it is working fine.
    I think I have some problem with the currency translation variable.
    Could anyone of you please send me the currency translation variable for Calendar month with the below parameters
    exch rate  type :  M
    Time reference : 0CALMONTH
                               End of month
    Target currency for a variable : < var created on 0currency>
    For my report,  i need calendar month selection, currency selection.
    Please help me with your ideas.
    Thank you
    Regards
    S.R

  • Currency Translation for Calculated Key figures

    Hello Friends I want to use the Currency Translation for Calculated Key figures.
    But when I go to Query and go to conversion tab it is always greyed out. Does that mean we can set the fixed conversion type for calculated key figures. like ZSAD Total debit - credit -flow value.
    What is the way to do fixed currency translation in query for calculated key figures.
    All the below is done now just want to specify this in query but I can'nt since it is greyed out.
    All the below is done
    I have created a Currency Translation Type " FiscperConversion" "ZVHGR" now this has Exchange Rate Type from Variable "ZVARN" (Which is a variable single value manual input on 0RTYPE Infoobject for exchange rate.)
    2. Now Currency Tab: Target Currency is selected from Variable placed in the Report. ZRPVAR.
    3. Now the Variable Time Reference is used. Standard Infoobject 0FISCPER
    which is beginning of period.

    Hi soniya
    Your calculated KF is result of some calculation ...so system will not allow u to do any translation on it...to get CT on CKF you should do it on base key figure...still if you wish to do then you can create a formula variable having processing type a customer exit...write code in cmod to rad exchange rate and multiply ur CKF by this formula variable....
    Thanks
    Tripple k

  • Reporting Agent - Print Layout - Issue in Displaying Key Figures in Rows

    Hi,
    We have issue while printing reports using Reporting Agent. As part of Query Definition we have Structure of key figures in Rows. But while creating Reporting Agent , in Print Layout option – Under Table – Rows – we are not able to drag Structure of key fig.
    What could be the solution to this issue. How can we use key figures in rows?
    Thanks in advance.
    Samir

    Hi,
    putting product in the rows will slove the issues as the unit cost  depends upon the  prdoduct and therefore it will uniquely identify each of the material and then it will get multiplies with the qty and therefore you will get the correct result.
    this kind of issue you will always face when you are going to multiply cost with the Qty and as the cost differ with the individual material.
    Also putting material into the rows will cause the no. of rows to increase as all the materials will show up in the individual rows for the particular month.
    Also you can make a claculated key fgure for the multiplication and use before aggregation.
    But for that your both the key figures should be in the same cube i.e. in the same rows or the before aggregation will not work you will not even get an option of before aggregation in the CKF if the key figures belong to two different cubes.
    Since your qty and cost are coming from two different cubes before aggreagtion will not work here.
    And if you do before aggregation then you report will become quite slow as it will do all the multiplication anf then will bring the result.
    So it depends on your requirement and your design how to proceed.
    Hope it helps
    Thanks

  • Calculated key figures with incorrect values

    Hi experts,
    i have a requirement whre i have multiple calculated key figures based on different restricted key figures.
    say for eg:
    RKF1-restricted to calmonth 01.2006
    RKF2-restricted to calmoth 01.2007
    ckf1-RKF1 %a RKF2
    RKF3-restricted to calmonth 02.2006
    RKF4-restricted to calmoth 02.2007
    ckf2-RKF3 %a RKF4
    and so on...
    In my output of the report, ALL CKFs are show same result as CKF1!!
    please suggest..
    thank you all in advance

    Hi,
    Indeed my cube is a copy of 0IC_C03.
    Could you please explain more about the filtering.
    I have the following key figures
    0TOTALSTCK
    0ISSTOTSTCK
    0RECTOTSTCK
    ZISSSTCK_VALUE
    ZREC_VALUE
    ZTOTSTKVALUE
    ZTOTSTKVALUE is CKF with inflow and outflow of ZISSSTCK_VALUE
    ZREC_VALUE
    Whenever there is 0 it displays NO CALC possible. I would like to have it blank or 0s.
    thanks

  • Calculated key figures are returning the word "ERROR"

    Hi All,
    the calculated key figures which i used in one query are displaying the word  "ERROR" at the end of the results as part of each cells formatting.But when i copied the same query to my system then its not showing the word error and even i created one more query which is a replica of the first one and then also iam not getting the error .
    what might be the cause of this issue . kindly suggest me how to control the word error in the out put
    regards,
    jayakrishna

    Hi,
    you can control the way BW displays exceptions with customizing (SPRO) transaction RSCUSTV4.
    identify differences of these settings in your systems and apply them accordingly.
    hope this helps...
    Olivier.

  • Selection on Global Calculated Key Figure problem

    Hi all,
    I've got a Calculated key figure, made up of 2 key figures and 2 restricted key figures, saved to a homogenous multiprovider (Customer Sales).  this works fine as is. 
    However, when you create a selection in BEx QD, that limits the CKF further by Distribution channel, and view the result, the result seems to be multiplied by a value to the effect of 2.8???
    If you view the CKF by itself its fine (though not limited to what it needs to be).
    As an example.
    Say sales for a distribution channel was 1 million dollars.  Sales overall was 2 million dollars.  If i drag in my CKF (and have NO characteristics), it comes up with 2 million dollars.
    If i limit it to 1 sales office, no issues, I get that sales office's value.  However, if i limit it to a distribution channel, i get roughly 2.8 million dollars.
    Any ideas?  I can't see the logic in this.  Perhaps someone knows of the issue/has seen a note or something regarding this, cos its got me scratchin my head?
    Cheers

    Hi Pierre,
    I appreciate the fast reply.  This thing is driving me nuts!
    Ok so when you refer to the CKF are you referring to the global CKF on the multiprovider or the CKF i have on the report that is restricted (basically a local RKF)?
    I've had a look through there and have found the calculation tab, but can't really say i've found "Calculate according to current formula".
    What i see are:
    a dropdown list headed "calculate results as..." (nothing defined)
    another dropdown list called "calculate Single Values as..."  (nothing defined)
    a tick box called cumulated (unticked)
    another tickbox called "also apply to results" (unticked)
    another dropdown listbox called "calculation direction" (default setting)
    Underneath all that is a tickbox called "use precalculated value" (unticked).
    is it something under all that that i need to change?
    Do i change the global CKF or the local RKF?
    Thanks for the assist.

Maybe you are looking for

  • Can't connect to Samba shares after upgrading

    Hi, I recently upgraded to Samba 3.6.0-8 (among other things, including a new kernel 3.0-ARCH), and all my shares have become unavailable from Windows 7. I can't connect to any, nor can I see the shares list. My Arch box has essentially become invisi

  • How to create a Plan.xml file for modification

    Hi, I am trying to create a plan.xml file. Is there any way, I can generate a plan.xml file. I see a tab in Admin Console in deployments and plan. but there is nothing there. what it has to do with plan. Thanks regards Amir riaz

  • XI Message performance monitor / alert

    Hi Experts, I need your help, i'm involved in a project to monitor some XI aspects and I need to check if all of them are possible and of course if you know.. how The XI topics that I'm already confuse are: - XI Mapping Performance: It is possible mo

  • 1Z1-554-ENU: Oracle ADF Essentials exam, beta results?

    Hello, The results for '1Z1-554-ENU: Oracle Application Development Framework Essentials' where supposed to be made available yesterday, but there is no sign yet. I was logging in to my PEARSON VUE account, but there when clicking 'View Results' link

  • Make pop up window

    Hi For my vi I need to have a button that activates a pop-up window which contain text or graph with a close button.would u please help me how can I do this in Labview Solved! Go to Solution.