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

Similar Messages

  • Calculated Key figure and formula variable issue - Urgent

    Hi,
    I have created a formula variable on dates. When I run this locally it returns results. Now I have created a calculated key figure on this formula variable. It is not returning any results. Any idea on why this is happening.
    Thanks,
    Kal

    Hi Kal,
    Can you paste your Formula & Calculated Keyfigure calculation.
    If possible give information on ur formula variable ( processing by , charactesristic , replace variable with ( if it is replacement path ) , Dimension id )
    Regards,
    SRIKANTH

  • Regarding Calculated key figure on Formula variable.

    Hi Gurus
    I have a requirement. My business scinerio in E-recruiting is to find out no of days between requistion creation date and offer made date in each month of year.
    For example we have around 120 requistion created in calyender year .
    10 requistion in jan , 10 in feb , 10 in march , 10 april , ...........10 december.
    my client wants out put as
    jan       no of days between offer made date to requistion creation date.
    feb             ,,
    march        ,,
    april           ,,
    may           ,,
    june           ,,
    july            ,,
    december    ,,
    i have requistion , req creation date ,  offer made date , cal period , cal year , no of requistion in my data model.
    i am unable to this report.
    i have made structure in rows
    jan = no of requistion based on calperiod = 1,
    dec = no of requistion based on calperiod =12.
    in Columns
    i created a calculated keyfigure based on formula variable with replacement path of req created date and offer date.
    i am not getting the data. my guess is i went some where wrong. please give some advice where i am going wrong . plz help me on this
    thanks
    roopa

    Hi
    Thanks for your reply.
    Both req creation date and offered date are in the free characteristics of query.
    main problem for me is how to get no of days between offered date - req creation date in jan month.
    can you give me exact formula how to write it down in query builder
    <b> hi Banu ( Queen of reporting ) can you through ligth n this issue</b>
    Thanks
    Roopa
    Message was edited by:
            roopa chow
    Message was edited by:
            roopa chow
    null

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

  • 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

  • Diff between Calculated key figure and new formula 6extra functions why

    Hi Friends
                  In BEx query designer we have Restricted key figure & Calculated key figure. In the case of Ristricted Key figure And new selection the difference is Global and local.
    But if we come to Calculated Key figure and New Formula the difference is same global and local. But in New formula we have 6 extra function. My question is does is there any certain reason for this or SAP AG not be able to develop those functions
    Thganks & Regards
    Bramhanand

    Hi Surendra thank you for your reply.
    But i am not asking difference between calculated key figure and New formula.
    What i am asking is in the case of Restricted Key figure And new selection the difference is Global and local.
    But in Calculated Key figure and New Formula the difference is same global and local and in New formula we have 6 extra function. My question is does is there any certain reason for this.Why not SAP AG is not included the new formula functions in Calculated key figure.
    Thanks & Regards
    Bramhanand

  • 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

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

  • IF Condition in Calculated Key Figure .

    Hi,
       can anyone can tell the syntax for using "If Statement in Calculated key figure ".

    Hi,
    If amt1 ne amt2.
      select amt1.
    endif.
    Try the following for above condition :
    Create a formula varible.
    1) select 'amt1'.
    2) Go to boolean, select 'is not equal to'.
    3) select 'amt2'.
    4) select '*'.
    5) select 'amt1'.
    its looks like
    'amt1'<>'amt2'*'amt1'
    hope this helps..
    regards,
    raju

  • 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

  • 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

    Are the Calculated Key Figures Stored in a table anywhere on the system.  We would like to key a printout of all Calculated Key Figures used.

    ELTUID: I suppose it's an Internal ID for Query Elements, automatically generated in BW. In this table you find:
    STR Structures
    REP Queries
    VAR Variables
    SEL Restrcted KF
    CKF Calculated KF
    FML Formulas
    Hope it helps
    GFV

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

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

Maybe you are looking for

  • Is not equal to operator not working properly in obiee 11g

    Hi , I have 5 members in a dimesion ENTITY.gen5 (A,B,C,D,E) . nOW , I am using a *"is equal to "* operator in that , ENTITY.gen5 = A;B . Which results in a strange error while running the report : Socket communication error : was attempted on somthin

  • Sending SMS notification via business workflow

    Hello Experts, I want to send SMS notification fron business object BUS2078 via worflow please help me out process in ABAP program.

  • Process chain running :doubt

    Hi, I had scheduled one process chain which is running now--- now its in last step that is "deleting overlapping request in infocube----" i had checked this job : it is running with out any hassles-- now after this only AND process is there to finish

  • Max HD for Netra T1 AC/DC200?

    I'm trying to find out the largest hard drive the Netra T1 AC/DC 200 will support. All the documentation I come across only lists the "official" sizes. I believe the connector is an 80-pin SCA. Thanks. Edited by: 838558 on Feb 21, 2011 3:55 PM Edited

  • Unlock account with oiddas

    Hello, I want some users to be able to unlock accounts through oiddas. Which is the minimum role I have to grant these (portal)lightweight users to do so? Even a portal administrator doesn't have the 'account' subtab in the 'directory' tab. orcladmin