Key Figure Handling in Fox Formula

Hi,
i have to modify a key figure only if it's blank (initial value), is it possible to do this in a planning function using, for example, a code like this:
IF {Key Figure X} IS INITIAL
{Key Figure X} = {Key Figure Y}.
Thanks in advance
Fabio

IF {Key Figure X} IS INITIAL.
{Key Figure X} = {Key Figure Y}.
ENDIF.
That's ok.

Similar Messages

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

  • Cumulative Key Figure (Running Total) - how to use in formula?

    We have a scenario where I need to use the cumulative value of a Key Figure in a subsequent formula. The “Cumulated” property setting at the Key Figure level in the query is a “Displayed Data Only” setting, however, so the cumulated values are not available for use in a formula  The individual values are used by BW as opposed to the cumulative values that are displayed in the column.
    I’ve tried using the “Cumulated” property at the characteristic level. I am then able to use the displayed cumulative values in a formula. However, I also need to display the individual (not cumulated) Key Figure values in a column. These individual values are no longer available for display if the “Cumulated” property is set at the Characteristic level.
    I thought that the “Define Cells” functionality could possible be used, but there is only one Structure in the query, so the “Define Cells” functionality is unavailable. I could not think of a way to use a second structure in the rows, as the rows need to be dynamic (two characteristics, populated based on user input variables).
    It may be possible to accomplish this requirement by adding a column using VBA in the SAPBEXonRefresh sub, but use of VBA is not a preferred option, as the query may be run in either the Excel Analyzer or the Web Analyzer.
    The infoprovider does not contain a Key Figure field for Cumulative Volumes.
    The scenario details:
    Rows (Characteristics):
    A: Plant (values based on user input variable)
    B: Calendar day (values based on user input date variables for start & end dates)
    So there is one row for each day within each plant.
    Columns (Key Figures):
    A: Cumulative Volume at Start of Period (uses user input date variable for start date, and “Constant Value” property. Hidden column.)
    B: Daily Volume (for each day in the period defined by the user input variables for start and end dates)
    C: Cumulative Volume at End of Each Day (formula, meant to be equal to the sum of the Cumulative Volume at start of period plus the total so far of the Daily volumes. In other words, equal to the sum of Column A plus the running total of Column B).
    Does anyone out there have any more ideas on how to accomplish the required Cumulative Volume computation?

    Thanks for your reply Jurgen.
    I've created a Global Calculated Key Figure (CKF), and have looked at and tried a number of settings in the Properties of this new CKF.
    I have not yet been able to make this work for me.
    The "Cumulated" property for a Global CKF is also a display-only property. The displayed running total is not used in any formula containing this CKF, only the individual values are used in the formula.
    If I select the 'Enhance' option, where exception aggregation can be done as I think you suggested, I do not see a 'cumulated' option. If I select the 'Summation' option for 'Exception Aggregation', then the 'Reference Characteristic' pull-down is not available.
    Is there a different 'Exception Aggregation' option I should be using for running totals at the calendar day level?
    Or am I unclear on the concept of your suggestion?
    Perhaps you're on a later version of BW that has more Exception Aggregation options? (We're on BW3.5)

  • Currency Translation with a Calculate Key Figure

    Hi,
    Does anyone have experience with applying currency translation in BEX/Query Designer on a Calculated Key Figure? 
    I have a need for a calculated key figure to be converted to a target currency of USD (which is already defined via RRC1).  I also need the Results Row to display the summation in USD. 
    Currently, my calculated key figure displays two currencies (MYR and USD) and an incorrect summation of both currencies.
    Here is how I have defined my calculated key figure:
    NODIM ( 'Consumption (STOs)' ) * NDIV0 ( 'Material Source Plant Cost' / NODIM ( 'Source Plant Price Unit' ) )
    I am multiplying a quantity field by amount field and then dividing by a price per unit field.  I have applied NODIM on the other fields so that the amount field will retain it's properties.
    Running this query through transaction RSRT and clicking on the Generate Report button, I get the following message:
    "<b>Currency translation cannot be carried out for element 20 (my calculated key figure). Element 20 neither contains a Basic key figure nor a variable with type Amount. For this reason, you cannot and do not need to perform a currency translation</b>."
    From the above message, I must be setting my calculated key figure incorrectly. 
    Any ideas?
    Thanks!
    Hau

    Hello Ajeet and N Ganesh,
    Thank-you for your help.  I verified that the dimensions of my key figure 'Material Source Plant Cost' was of type 0AMOUNT, so that was not the issue.
    The issue was in the error message that was returned when I pressed the Generate Report button in RSRT.  Essentially, currency conversions in BEX can only be performed on basic key figures or simple replacement path variables. 
    I can perform the currency translation on a SIMPLE calculated key figure that contains only the replacement path variable (where 'Material Source Plant Cost' is an attribute of my master data characteristic ZMAT_SRC).  However, I found that I cannot perform the currency translation on COMPLEX calculated key figures, like in my example above. 
    To get around this currency translation issue and as suggested by the error message, I created a SIMPLE calculated key figure for replacement path variable 'Material Source Plant Cost' and performed the currency translation.  The problem with this solution is that while I get my currency translation, I also get a calculated key figure that is aggregated, according to the query layout.
    To get around the aggregation issue, I also created a dummy counter as a master data attribute (of ZMAT_SRC) to capture the aggregation.  I assign a value of ‘1’ to this dummy counter/master data attribute in the update rules to my ZMAT_SRC infoobject.
    I then divide my new (aggregated) calculated key figure for 'Material Source Plant Cost' by the dummy counter (which is also aggregated).  Essentially, I divided the aggregated replacement path variable by the scaling factor.  The result is that I get a new calculated key figure that has been translated into the target currency and in the correct scaling factor.  I can use the new calculated key figures in the above formula; regardless of the report is rolled-up.
    Again, thanks for your help.  It gave me the pieces to solve this puzzle.

  • Calculated Key Figures Corrupted in a BEX Query

    Hello SDN's,
    We are facing an weird issue in BEX Query. As part of Enhancing the query, We have created a new CKF and added in the Columns for the required CKF. It prompted for a Transport request and saved the Query elements for more than hour. Now the Query is throwing an Error messages where in more than some 30 CKF's got corrupted. When i check the CKF definition for all the corrupted key figures there is not Formula or Calculation.
    Below is the message which we can see in the BEX query for Corrupted Calculate Key Figure.
    Diagnosis
    Element ' XXX ' cannot be analyzed by the analytic engine without a definition.
    System Response
    Without a valid definition, the element will be ignored by the analytic engine.
    Procedure
    Provide a valid definition for element 'XXX'.
    Could anyone please help me to retrieve query back to normal ???. Your are inputs are appreciated
    Thanks,
    HA

    yo could try rsrt in bw and try to regenrate the query thats all i got. .otherwise always make a copy before you start working on a query. if it still is coruupted then you will have to recrate it. if the query is in your bwq maybe the basis can do a transport( not recomended)back. good luck..

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

  • Regarding classifying values in a key figure

    Hi All,
    I need help in defining one query. In my query there is a key figure with positive and negitive values(Quantity). I need another key figure (Key figure 2) to display all the negitive values for a condition price list type =02.
    That is "IF PRICE LIST TYPE =02 and qty is nigitive" then display in Key figure 2
    How to achieve it??
    Regards
    Jay Y

    Hi,
    Create a Calculated key figure with the following formula:
    ( 'Keyfigure' < 0) * 'Keyfigure'
    The expression ( 'Keyfigure' < 0) returns 1 when ever the expression is true.
    Use this CKF in the query along with the restriction on Price List type.
    (You can create a restricted key figure using the above CKF & restricting it on Price List type)
    Hope this helps.

  • Formula is not working for key figures (  cumulative )

    hI
    I have  Qty A and qty B key figures  and changed property to cumulative in query designer . two key figures are working fine . I ahve another key figure which is formula ( Qty A + Qty B) .
    Issue is
    Formula ( Qty A + Qty B) is showing before cumulative values result . it is not showing cumulative total .
    Ex :  
                       Before cumulation prperty for Qty A and Qty B
                          Qty A       Qty B         Total ( formula ( Qty A+ Qty B)
                            10            20                  30
                             8              7                    15
        After changing propert cumulative in query designer for Qty A and Qty B
                         Qty A       Qty B           Total ( Formula 9Qty A + Qty B)
                           10            20                30
                            18           27                 15 ( still it is show 15 like above example means formula is not working on cumulative values)
    Formula is working on before cumulative value . it  is not taking cumulative values.
    Please helo to resolve this issue . I think I need to change some prperty in query designer.
    Appriciate your response.
    Thanks
    Rohan

    Hi
    Problem solved .
    Thanks
    Sree

  • Problem in using formula when key figure is commulative

    Hi all ,
    I am problem in generating the report when we use the  of cummulative key figure to the formula..
    consider the following senerio..
    Date      KF1 KF2 KF1(C) Kf2(C) Formula (KF1(C) - KF2(C)
    5.10.2005 1   2   1       2      -1 (wrong result)
    6.10.2005 3   4   4(1+3)  6      -1
    7.10.2005 5   6   9(4+5)  12     -1
    System is taking the actual KF1data is subtracted with KF2 data it not taking cummulative data, Actually my requirement i want to subract the cummulative data between two key figure (ie KF1(c)-KF2(c))
    My Required Output:
    Date      KF1 KF2 KF1(C) Kf2(C) Formula (KF1(C) - KF2(C)
    5.10.2005 1   2   1       2            -1 (Correct)
    6.10.2005 3   4   4(1+3)  6            -2 (4-6)
    7.10.2005 5   6   9(4+5)  12           -3 (9-12)
    pls let through the lights on the above issues.
    with Regards,
    Hari

    Hi Murali..
    Thanks a lot, now i got a proper output and working fine..
    what i did yesterday was i have creted a two key figure as a cummulative key figure ..
    and when i try to subtract two cummulative key figure system is subtracting with actual key figure and hence i got wrong result.
    Today i did same thing, only diffence is i made the third formula key figure as cummulative ..
    With regarsds,
    Hari

  • Calculated Key Figures vs. Formulas

    Hello all,
    Can someone explain in a few words what's the difference between a Calculated Key Figure and a Formula? We know the CKF's are global to all the queries and the formulas aren't. But how can we decide when to use ones or the others?
    Many thanks,
    Inma

    Hi Inma,
    As you correctly mentioned, the CKFs are Global, which means that they can be used in different queries built on the same InfoProvider. Formulas cannot be directly reused, but if they are saved to a global structure, then the structure may be reused. If you are creating a calculation that will be widely used, it is best to create it as global...this helps a lot when you need to revisit the definition, and make changes as one chnage is reflected in all queries.
    However, there are some functions like SUMCT, SUMGT, SUMRT, %CT, %GT, %RT which are available only to the formulas (local), so if you need to use them, you cannot use a CKF.
    Hope this helps...

  • Calculated key figures Vs local formula

    HI,
    I am having 4 queries on a cube.
    i am now using calculated key figures instead of local formulae.
    I want to know "which is better in performance wise/ or may be pros and cons of using each one."
    Can any one clarify me.
    I know that
    1.when we select the option Calculation after aggregation will improve performance.
    2.we can do some more things only with Cal. Key Figs using formula variable.
    Here my concern is not that.
    I am concerned about general case like -
    i have to add, multiply or divide some direct key figures and use some data functions like nodim, NDIV0 functions.
    Thanks in advance.
    Regards,
    Raghu

    Hi Raghu,
    Formulas cannot be directly reused, but if they are saved to a global structure, then the structure may be reused. If you are creating a calculation that will be widely used, it is best to create it as global...this helps a lot when you need to revisit the definition, and make changes as one chnage is reflected in all queries.
    However, there are some functions like SUMCT, SUMGT, SUMRT, %CT, %GT, %RT which are available only to the formulas (local), so if you need to use them, you cannot use a CKF.
    In addition to the differences, A formula can only work on other formulas/selections already in your query (in the same structure as your new formula), while a calculated key figure can only work on other key figures, calculated key figures or restricted key figures. However both can use formula variables.
    CKF are calculated at the time of loading data.
    Your Formula calculates at the time of running the query.
    Hope this helps...
    Regards,
    Yokesh.

  • Difference between Formula, Formula Key Figure & Formula Variable

    Hi Experts,
    I have a basic question in my mind:
    1) What is the difference b/w Formula, Formula Variable, Formula Key Figure?
    2) What is the difference b/w Selection, Filter and Restriction?
    Can you pls explain with some scenarios? That will be helpful.
    Thanks in Advance.

    Hi,
    You are right, these are basic questions and can be learnt just by a little bit searching.So search the forum before posting such questions please.
    Nevertheless :
    http://wiki.sdn.sap.com/wiki/display/BI/CalculatedKeyFigure+RestrictedkeyfigureFilter
    http://help.sap.com/saphelp_nw04s/helpdata/en/61/d0b143aa26b849b4e79a859ea1d7d1/content.htm
    Scenario:
    You want to see the revenue that you get from Product A,B,C in the country of D and E.You also want to calculate a bonus value that will be given to distributors and this revenue will be calculated based on the user's input.E.g user inputs 5 and you give 5% of the sales to distributors.Then here, to get the input 5  and TO USE IT IN THE FORMULA ,you must create a formula variable.You also  must a have key figure revenue to see the revenue of course and a calculated key figure(or a formula) called bonus value = formula variable*revenue/100 to calculate the bonus which will be given to distributors.
    The other thing you must do is restricting product with A,B,C and country by D and E just by right clicking on them  in query designer.What remains is the selection.Let's say you also want to see the total sales of A and B.Then create a selection in the columns then restrict it by dragging and dropping A and B and the key figure revenue.
    By the way, filter(tab) is used to restrict the data coming from cube and affects everything in the report(in contrast to the restricting  selection, because restricting selection affects only the selection, not other fields of the report)
    Regards,
    Güneş BÜYÜKTANIR

  • Documentation for Formula Key Figure

    Hi BW Gurus,
    I have a Formula Key Figure which has been defined in a local key figure structure. This key figure is based on a two standard Key figures which exist in the Cube.
    How can I create Documentation for this formula key figure, so that user can see documentation after right click in the Key figure in the query result.
    I have tried followings, but did not work.
    1) Go to Properities of the query and go to Documentation . In the next screen, create documentation directly using the technical name of the Formula key figure.
    2) Go to Documentation in RSA1 and create documentation using the same way(technical name).
    In the query result, I am getting error " Query element does not exist in database".
    Thanks in advance.
    Mridul

    hi ,
      Probably you should go for Cell definitions. But if you use Cell definitions, then query will slow down. But if you need the way which you described, it can be acheived by cell definitions.
    Hope it helps.......

  • Condition formula variable on date key figure

    Hello, I would be grateful for any help on this
    I want to have a condition that has a user input formula variable
    But the Key Figure on which I want to base the condition is a Date
    And when you create the formula variable it allows only the following Dimensions :
    Amount
    Number
    Price
    Quantity
    ie Date is not one of the allowable Dimensions - is there any way round this apart from an Exit variable ?
    thanks
    Jon

    Hi,
    You have to create a formula variable with replacement path based on the date you want.
    so that you can get the date for calculation.so you can apply condition.
    check the following link
    http://help.sap.com/saphelp_nw04/helpdata/en/03/6ba03cc24efd1de10000000a114084/content.htm
    Regards,
    Ranganath

  • Part2_ Formula var_Currency Conversion on Calculated key figure

    Hello Friends Thanks for SDN response on how to work the currency translation in calculated key figure. Please suggest more on SDN Response if u have any customer exit code that I use to read the exchange rate. and what should i define in Formula variable. I donot want to use it on base key figure since then it will show up in report
    SDN Response
    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
    Soniya

    hi don't know exactly your business requirement but you could inspire yourself with a virtual characteristic sure you will get the solution or clues.
    hope you will find what you look for in this how to paper
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e473ab90-0201-0010-22ac-fdd925cac167
    bye

Maybe you are looking for

  • Passing validation(ob28) for particular company code at the time of posting

    Hi Gurus, My business requirement is creation of new company code for recalculation of accrual amount. where in these recalculated amount will be posted to new company code, however we had defined some validation (ob28) for document posting. so my qu

  • Adobe Reader XI 11.0 problems with MS Word

    I wanted to convert MS Word to PDF. Seeing it was avalible with Adboe Reader XI I clicked to initiate the conversion. To my surprise I would have to pay for this process, a price I did not agree with. I didn't continue the payment process. I now have

  • Podcasts Now Autodownloading

    All of a sudden podcasts are autodownloading on my Mac Pro.  While I am subscribed to many podcasts, I don't download them all because I like to pick and choose.  This requires manual control which I seemed to have lost and could not find a setting t

  • What bluetooth device works with home stereo

    Is there anyway to connect my Imac to my home stereo via bluetooth or any other methods short of stereo cables.? I was hoping that there is a moldule that connects to the home stereo some way ? I have all this music on my computer and no way to play

  • Expire date / new adobe cc activation

    I ordered a new english version of my adobe cc, got the code etc.. but then i found out that my current adobe cc didnt expire until the end of januari.. can i still use 1 year ( 12 months ) of the new adobe cloud I ordered ( some months ago ) or will