Calculated Key Figures based on Attributes

Hi
In one of our queries we need to create a calculated key figure based on an attribute. Any suggestions on the best way to do this?
I have looked at a Virtual Key Figure, but because our Cube name contains underscores (_) it shortdumps. Is there a way around this?
Thanks in advance.
Chami Herath

Hi,
what do you mean with calculated key figure based on an attribute? Is your attribute a characteristic in the cube or is it just a attribute of a characteristic? Let me know more details.
regards
Siggi

Similar Messages

  • Calculated Key-Figure based on Cumulated Key-Figure

    Hi BW-Community,
    I have problems defining a ckf based on a key-figure wich are marked as cumulated. I know this topic was discussed before
    but I did not find a acceptable solution yet.
    Here is my example (as it should be)
    *** KF1     KF2   CKF3 (KF1 % KF2)
    2            2           100%      
    4            2           200%
    6            2           300%
    And this is the Output from BW
    *** KF1    KF2   CKF3 (KF1 % KF2)
    2            2           100%      
    4            2           100%
    6            2           100%
    BW uses the not cumulated keyfigure-value instead of the cumulated value,
    I tried several things:
    1.) Use the class CL_RSR_WWW_MODIFY_TAB and redefine the method data_cell to do a manual calculation on the results. This works but
    it is very inflexible and restricted on WEb Template also the Excel Integration do not work properly.
    2.) Mark the CKF also as cumulated but this don't work either.
    My customer uses such calculation on almost every Query and Report so I need a practicable solution.
    I think the best way to solve this is in the staginf prozess, but i did not find a solution yet.
    Does anybody know a workaround, solution? We will put to NW2004s soon is there any chance that this will work
    in this release?
    Thank you in advance
    Greetings
    Timo

    Hi
    Thank you for the replies.
    I create a new CKF without percentage funktion but it didn't work. Same result as described in the first post.
    Even if i put only KF1 in a new CKF (e.g.CKF2  =KF1) the uncumuated value is shouwm
    Example:
    *** KF1    CKF2
    2           2 
    4           2
    6           2
    @ Structure
    I know that using structure is possible. But we cannot use structures, because we have a dynamic amount of characteristic-values (e.g. 0calday)

  • Can a Calculated key figure be derived from characteristic value?

    Hi,
    I would like to know whether BW allows to derive a calculated key figure based on a characteristic value. Let us say we have a row like
    PLANT-DAY-INVENTORYQTY
    and based on my plant value, I want to have another column 'CALCULATEDSCRAP' which is derived from 'PLANT' and INVENTORYQTY (I know this is a crude example, but will do for my need)
    Is there any way in BW to get this logic implemented?
    Thanks,
    Ajay Das

    Hi Tom,
    I have a very similar problem. In my if logic i compare to dates  but I don´t understand what you meen by
    "Therefore I suggested to add an attribute to convert the characteristic in a number and use this number for the if logic."
    For the moment, the condition calculates each field individualy correctly but doesn´t treat them as numbers when aggregating.
    Thanks in advance,
    Victor.

  • Calculated Key figures using different key figures

    Hi All,
    I want to create a calculated key figure based on Actual and Plan.Actual values are coming from InfoCube,Plan values are loaded from Excel sheet into different key figure in another infocube.I've created a MultiProvider for these Cubes.Now I want to find the difference between plan and actual.So I created a calculated keyfigures based on the key figures.But the Query is giving error ..
    Then the connection terminated..
    Let me know how to do..
    Raji

    What is the error you are getting?
    First do this.
    In the query, filter on only 1 infoprovider. Check the KF's and see if correct and if you get the error. Then, do the same thing, for the other infoproviders. Once you get no errors that way. Remove the filter. See if the KF's are ok and no errors. Then do your calculation.
    Also, make sure in the definition of the KF's, you are filtering each on the right infoprovider. (For instance, KF1 has a filter on infoprovider1 and KF2 has a filter on infoprovider2.)
    hope this helps!
    /smw

  • 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

  • Problem in Calculated Key Figure in BEx 7.0

    Hi All,
    In Bex 7.0
    We have a requirement where we need to display a key figure which is having unit price of an Article. In our InfoProvider we have Article, Store and Date and the report is based on Article. As we have to display only the latest price we have created a RKF by putting a restrcition of the latest date in the date range on the the unit price key figure. But still unit price is getting aggregated over stores.
    For example if there are 10 stores and the unit price of an article is 5, then data displayed is 50 and not 5.
    We tried to create a Calculated Key Figure using the above RKF and an exception aggregation Average of all detailed value that are not zero, null or error on reference characteristic 0PLANT. Its working fine when the query is restricted to one or two Articles. But for all the articles it gives the following error messages.
    1. Error while reading data; navigation is possible.
    2. Error occurred during parallel processing of query 17; RC3
    3. Error executing physical plan: AttributeEngine: no 6952
    4. Error reading the data of infoprovider ZXMSC01$X
    5. Amount of data that is to be read from the BIA server is too large
    6. The following error 6952 occurred in BIA server
    7. Error executing physical plan: AttributeEngine: not enough memory;BwPopMerge pop1(setIsLastMerge(1)),in executor::Executor in cube: p03_zxmsc01
    Can anyone tell me the solution for the above error. Or if there is a workaround to our requirement.
    Regards,
    Sachin

    Hi,
    Could be a memory issue.
    One of your cube in on BIA which is causing the Problem.
    So executing the query in RSRT by selecting Do not use BIA index option.
    If the query is executed with out any issue then take the cube out of BIA and push it back.
    Hope it helps.
    Regards,
    Raghu
    P.S : Also please let us know if this query is live and it is an issue that you are facing after executing it properly for few days.
    Or this is a new query created and testing now and in the process got this error?
    Edited by: Raghu tej harish reddy on Sep 24, 2009 5:53 AM

  • Can one call a function module in Calculated Key Figure?

    Can one call a function module in Calculated Key Figure? If  yes how, if not, what is the solution if formula does not suffice?
    I want to convert duration which is in seconds to   Duration in Hours and Minutes. There is a function module for doing it. Not sure how to do it in a formula.

    One option you have is a Virtual Key Figure and User Exit to use the Function Module to convert the time from seconds to HH:MM. Here are two documents on this subject to help you create them, based on the technology your comfortable with:
    [Implementing Virtual Key Figure/ Characteristics Makes Query More Dynamic|https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/e051fda8-71a9-2a10-ac9e-8d17414a8c8c&overridelayout=true]
    [Step By Step Process for Virtual Key Figures and Characteristics through BAdi|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/60e34f63-f44c-2c10-488e-c89b04e0ca7c&overridelayout=true]

  • Calculated Key Figures in IP FOX

    Hi,
    I would like to modify the calculated key figures using custom Formula planning fuction (FOX). Can some one let me know how to change these calculated key figures from BEx.
    I have found a thread discussing the same topic.
    Business Planning
    So do we have to definitely create a key figure in real time cube to be able to change the values in BEx calculated key figure.
    this is only for simulation purpose based on some key figure values and not for storing values in the cube.
    Regards
    Bhav

    Hi,
    If I understood correctly, you are asking why we have that "planning" tab in the properties of Calc KFs also? I think its just that the properties tab for all KFs is the same (no special customizing for any kind of KF), but it obviously doesn't make sense to set planning properties for calc KFs.

  • Can you share Bex Calculated Key Figures in BI-IP

    We have a requirement to establish P&L planning for a company.  Two questions:
    1. There are a number of calculations that are required for various values (i.e. current month, previous month, current month contract to date, previous month contract to date).  I am trying to determine if I should build these calculations into the query using C-KFs or apply them during ETL as multiple cumulative key figures?  Data volume is small (200 records a month) so we were thinking a key figure based model (instead of using cost elements) for this as they don't utilize FI in ECC in a typical fashion.
    2. After we get this initial data into SAP BI for reporting, we would like simulate it using plan/forecast versions.  In BI-IP I learned that it can use R-KF & C-KF as it uses BeX.  If I create a bunch of C-KFs, can I utilize those calculations in BI-IP so I don't have to create FOX formulas for them?
    Thanks!

    Thanks for your responses.... Unfortuntately, I need to plan on some of these values so it sounds like CKFs won't work for me.  I wonder why SAP claims BI-IP can utilize CKFs if you can't save any of the results of these?  Is it possible to save them as planning items?  
    Also, if I have to do formula/ABAP transformations on the update rules for the flat files coming in, can I leverage any of that in BI-IP if they are on the same infoprovider?  I know FOX fairly well and can off-set time periods (i.e. current month, previous month), but I don't know how to cumulative values in the ABAP routines nor time periods off-sets.
    Please advise if there are any good sources for this documentation.
    Thanks so much!
    -Matt
    [email protected]

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

  • Use of key figure based on period

    Hello All,
    I have 2 key figures in my multiprovider, e.g. Actual Amount and Budget Amount.  I need to display one of the key figure based on period.  Reports have January to December columns.  Now, if current period is October, I have to display Actual Amount from January to October.  For future periods i.e. November & December, I need to show Budget Amount. 
    Can anoybody please provide a solution for this?  How should I proceed?
    Thanks and Kind regards,
    Ajay

    HI Ajay
    Looks like you are creating a Capital Forecasting report. In order to show amounts period by period what you need to do is
    - Create one key figure for actual amount which might be based on 0Amount key figure with Debit/Credit indicator as S. (If this is not the case then please do so according to your requirement)
    - Create one key figure for Budget amount (according to your requirement)
    - Create one customer exit "Formula" variable called actual indicator. This variable will be populated with a number of 1 to 12 for each record in your cube based on the user entered month. i.e. if user enters October. assume your cube has 12 records one for each month the first 10 records will be populated with 1 and the records for Nov and Dec will be populated with a 0.
    - Create one customer exit "Formula" variable called Forecast indicator. This variable will be populated with a number of 1 to 12 for each record in your cube based on the user entered month. i.e. if user enters October. assume your cube has 12 records one for each month the first 10 records will be populated with 0 and the records for Nov and Dec will be populated with a 1.
    - Create a calculated key figure that is defined as (Actual Amount)Actual indicator + (Forecast Amount)Forecast Indicator.
    - Create twelve restricted key figures with the CKF created in the previous step restricted with the month (Jan to Dec)
    - Add the above created twelve RKFs in the query.
    Regards,

  • Using Explorer with Calculated Key Figures from BEx (BW 7.31 / BI 4.1)

    I'm looking for suggestions on how to leverage data from calculated and restricted key figures in BEx (from a BW 7.31 system) with Business Objects Explorer (from a BI 4.1 system).  Our current process involves some complicated workarounds and with the implementation of BI 4.1 and I'm hoping to streamline things a bit.
    Here is what I had in mind...
    An information space (indexed daily) sitting on a universe (hopefully UNX) that referred to a BEx query on a multiprovider in BW.  My understanding was that universes would be able to consume BEx queries (including their restricted and calculated key figures) in 4.1.  Based on a recent post (http://scn.sap.com/thread/3417905), it appears that the feature that I was hoping for may have not made it into the GA release.  Obviously, I could move the calculations and restrictions into BW ETL or maybe into the universe, but since that work has already been done and lives in the queries, I'm hoping to use them!  Also, we could use a different tool such as WebI, but at this point the user base is comfortable with Explorer and we would like to continue to use it.
    Suggestions? 
    Thanks!
    -S

    Hi McDowell,
    Regarding to the BEx connection in Explorer, SAP provide two solution
    1. BWA connection
    2. Unv on top of connection
    For the UNV situation, you could use the calculated / restricted key figure in the system but please assgin the aggregation level for them (Database delegate is not supported if I am not wrong)
    Also plese consider two points
    1. Data size (UNV cannot support large data size)
    2. Scheduling (Explorer does not support event trigger? correct me if I am wrong)
    Best regards
    Alex yang

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

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

  • 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