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

Similar Messages

  • 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.

  • Restricted/Calculated Key Figures in Query vs MDX?

    Hello All,
    We are embarking on our first project utilizing SAP BW as the Data Warehouse and Web Intelligence as the presentation tool.
    We plan on creating the universes on BW Queries.
    What are the pros and cons of using Restricted and Calculated Key Figures in the query versus creating them in the Universe?  Also from a performance impact point of view if there is any?
    Best Regards,
    Dan Krieg

    Hi Dan,
    I would suppose that there is no big influence on performance. If the calculation for the calculated key figures are very complex I would propose to calculate them on query level. So its easier to use them also in other environments.
    Please take into consideration that OLAP universes are not supported in Crystal Reports. More information you find in the thread [OLAP universes and Crystal Reports|OLAP universes and Crystal Reports;.
    Regards,
    Sebastian

  • Error when Using a Calculated Key Figure

    Hi,
    I am having a problem using calculated key figures (CKF's). I am not getting any errors
    when i am creating them but when i pull the same into the report it is giving an error
    SUB FORMULA not available. Can you please advise how to fix this issue.
    Thanks
    Rashmi.

    Hello Rashmi,
    thius is a known issue. The procedure from note 1238872 can be useful:
    Download the BI 7.0 front-end add-on for SAP GUI 7.10, Support Package
    700 from the SAP Service Marketplace.
    Then save the calculated key figures in the InfoProvider (left-hand side
    in the Query Designer):
        o  Select the calculated key figures in the InfoProvider.
        o  Save the calculated key figures using the context menu
        o  or in the properties of the calculated key figures (right-hand
           side in the Query Designer).
        o  If other calculated key figures are used in a calculated key
           figure, save them as described above.
        o  For safety reasons, also save the query definition.
    If the calculated key figure was saved correctly, the system does not
    issue any error messages when you check the query definition (by
    choosing "Menu -> Query -> Check").
    Cheers,
    Ricardo

  • 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.

  • 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

  • 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!

  • 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 ?

  • 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 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.

  • 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.

  • Restricted & Calculated Key figures and Structures

    Hello Gurus,
    I'm using a BW Query to create my universe and all I see is a class called Key Figures and few objects. I don't see my restricted and Calculated Key figures.
    Also I want to understand how are the Structures in BW Query brought into Universe? All I see is a column class and row class with corresponding objects in it.
    Environment: BO XI 3.1
    Appreciate your help.
    Regards,
    Vijay
    Edited by: vijay dwivedula on Jun 12, 2009 7:46 PM

    Hi Ingo,
    Sorry for getting back a little late on this issue. I've been trying to fix other issues. I'm creating my report out of BW Query and I'm not able to see all the Restricted Key Figures. Also when I try to create my report out of existing key figures and verify the data with BW analyzer the data seems to be different.
    What happens is in my universe I've two classes naming Rows_xyz, Column_abc etc and there are like 25 objects in Rows_xyz when there are supposed to be like 60 key figures and in Column class I have a single object. When I pull in this coulmn obect and pull like 3-4 key figures (which I made sure have data from BW Query Analyzer) doesn't return any data. It doesn't even throw an error as No data to fetch.
    I took the MDX Query that is generated by this report and ran it on the backend and see that there is no data even there. But from the BW Query Analyzer I can see data for this Column and the key figures that I pulled in the report.
    Thank you for your help
    Vijay

  • Need some help on Calculated Key Figures

    Hello All,
    I created a query on a multiprovider and trying to add a field to an existing Structure on rows.
    The new field is a combination of 5 differnt key figures.
    Eg: (KF1KF2KF3KF4KF5) / KF6 * 100.
    How can I add this formula field into the strucuture on rows. do i need to create a CKF ??
    Thaks in Advacne.

    Hello,
    Yes you can create a calculated key figure if you are going to reuse the calculation. However, if you're going to use this only once, you can just create a local formula. Just right click on the structure and then select New formula to create a new formula or create a new calculated key figure on the left screen panel to create a calculated key figure.
    Hope this helps,
    Juice

  • ELSEIF in calculated key figure

    Dear gurus
    We have recently upgraded to NW2004s, and would need some help on the formula for my calculated key figure. This calculated key figure is meant to replicate IF... ELSEIF statement, depending on what the user enters. The logic that we have are as below :
    IF Var=1, then display key figure A
    ELSEIF Var=2, then display key figure B
    ELSEIF Var=3, then display key figure C
    ELSEIF Var=4, then display key figure D
    where Var is a Formula Variable, Processing By User Entry/Default value.
    The formula that we have originally, in BW3.5 is :
    <i>(Var == 1) * 'Amount in TC' + (Var== 2) * 'Amount in Comp Code' + (Var == 3) * 'Amount in Parall USD' + (Var == 4) * 'Amount in Hard Cur' </i>
    This formula has served us well in BW 3.1 to BW 3.5, and never had any problems with it. However, when we migrated over to BW 7.0, we could not get values for this formula (eventhough we have data in our cubes). The only data that get is when we key in Var=1, but when we try with Var=2, 3 or 4, no data is displayed in our key figure.
    We tried to debug, but somehow we could not figure out how the new BW7.0 calculates these type of key figures, and whether is there a change in the formula variable. We believe that the problem may lie in the way that BW 7.0 interprets the formula above, and only obtains the first portion of the formula (Var==1).
    We would appreciate any helps, and of course, points will be awarded if problem can be solved.
    Thanks a lot

    Dear all
    With some luck in searching, I manage to find an OSS note which depicts this error and resolve it. For those who have the same problem, please use this OSS Note 994194.
    Cheers

Maybe you are looking for

  • SAP R/3 4.7 EX 2 SR1 - IDES (Unicode), Problem during DB load

    Dear Experts, Details of the system: Solaris 10, Oracle 9.2.0.7. R/3 Enterprise 4.7 X 2 SR1 - IDES (Unicode) Please help me in solving this problem. I have received this error during DB load Phase 25/37. Errors are related to code page conversion fai

  • Checking for X continuous periods for a certain item

    Hi, simplified, I have a table like this: ROWNUM VEHICULE_ID FROM(DD/MM/YYYY) TILL(DD/MM/YYYY) ============================================== 1 1 10/09/2009 02/02/2010 2 2 01/01/2010 31/12/2010 3 1 01/01/2010 31/12/2010 4 3 01/10/2009 31/03/2010 5 1

  • How to create subfolders for Albums?

    everytime i add a new albums to that long list, it gets very hard to find them again. sometimes i dont even know what im looking for because its just a random list. is there any way to improve it? i still wanna keep the albums as they are instead of

  • Writing a simple XML editor

    I need to write a simple XML/SVG code editor for my application. I basically want to display the contents of an XML DOM so that if the user changes the text in the editor the DOM will be updated to reflect this. What would be the best way to do this?

  • Email subject line problem

    I upgraded to Mavericks when it first came out. I have 5 email accounts setup in Mail. One of my Google accounts behaves oddly. When I create a new email, the subject line allows tyoing in a few (3-5) characters and then clears out and any new cahrac