Cumulative Value for calculation in Formula

Hi All,
We have a requirement to use a formula based onthe cumulation of Keyfigures in the report.
The scenario is like this
KF1  KF2    ***(KF1)  ***(KF2)     Fornula1 = ***(KF1) / *** (KF2)
10     2       10                     2           5
20     3       30                     5           6
30     4       60                     9           6.7
40      5      100                   14          7.1
while we can display cumlative values of KF1 and KF2 in reports by using the calculation tick the cumulative valuses cannot be used in formula
Is there any work around

Hi,
As you now know that cumulated Kfs cannot used in a formula, why don u try creating cumulated Kfs using some Time chracteristics?
Like this you can hard code the cumulation.
You can use SAp exit variables on Time characteristics to keep these values dynamic.
Hope this helps,
Sharmishtha

Similar Messages

  • SQL Query to find cumulative values for a Financial Year

    Dear users,
    My requirement is to create a SQL query for a table/view where I have day-wise data. I want to find out cumulative values for financial year by giving any date. It should add the values from start of financial year till that date in the financial year.
    I think creating a view of such type will post heavy burden on resources since accuimulation will be done for each day upto that day.
    Thanks

    Dear users,
    My requirement is to create a SQL query for a
    table/view where I have day-wise data. I want to
    find out cumulative values for financial year by
    giving any date. It should add the values from start
    of financial year till that date in the financial
    year.
    I think creating a view of such type will post heavy
    burden on resources since accuimulation will be done
    for each day upto that day.
    ThanksKumar's solution will serve yours purpose but m not agreed
    I think creating a view of such type will post heavy
    burden on resources since accuimulation will be done
    for each day upto that day. Khurram

  • Using cumulated values for further calculation in a bex report

    Hi ya'll,
    I have a problem with using cumulated values in a bex report.
    the report has three lines:
    Values 1:    100    200  300
    Values 2:    10      5     40
    Values 3:    1000  500  4000
    The values of row 3 is a formula multiplying the values from row 1 and 2... My problem is that the values of row 3 are wrong - for example 200*5 isn't supposed to result in 500 !!
    I figure the reason is that the values of row 1 is a cumulated result, meaning the <i>actual</i> value of the second column of the first row i 100 (and not 200).
    How can I ensure that my formula for row 3 uses the <b>cumulated</b> result from row 1, instead of the underlying result ?.

    Create a column structure with Actual Value columns as well as cumulated value columns. Hide Actual Value Columns from display.
    Example :
    Actual1 | Actual 2 | Actual 3 | *** 1 | *** 2 | *** 3 |
    100 | 100 | 100 | 100 | 200 | 300 |
    You can create a forumla to calculate Value 3 : (Actual 1 * Value 2 ).
    I guess you are using Cell Referencing to achieve this.

  • Taking display value for calculations using structures in Bex query

    Hi
    I am using Bex analyzer to do a simple report with two key figures ‘Sales’ and ‘Plans’ from cube and two more calculated key figures ‘Abs Deviation’ and ‘% error’. The report displays at category and product levels. Category is higher and one category contains multiple products.
    The simple formulas for the two calculated KF are,
    1. Abs Deviation = Abs (Sales – Plans).
    Abs Deviation is set with the property Calculate result as ‘summation’ to add up Abs deviations at product level to show at Category level.
    2. % Error = Abs Deviation / Plan.
    The issue is with the % Error value at category level. At product level, all the values are showing correctly.
    To illustrate the issue with a simple test case,
    CategryProductSale-PlanAbs Dev----%Error
    C1--P1--100-60---40--
    67%
    C1--P2---50120---70--
    58%
    C1 Total--150180---110--
    17%
    Observe that in the output the calculation for ‘%Error’ at product level is correct all the way. But the summary
    calculation for ‘Error%’ i.e. C1 total which is showing as 17% is wrong. The correct value as per the formula should be 110/180 = 61%.
    SAP, through OSS replied that it is not a bug but the default behavior of OLAP calculation. OLAP processor first calculates the formula for % Error and then shows the display value at C1 total for Abs Dev. Meaning, ‘% Error’ is calculated first and next the summation for Abs dev is displayed. Abs dev 110 at C1 level is only a display value but not the value taken for % Error at C1 level. Instead OLAP calculates the Abs Dev at C1 level by Total sale – Total plan = 180 – 150 = 30 and the % Error calculation takes this 30 value in the formula and gives % Error = 30/180 * 100 = 17% at C1 level. But 17% doesn't make any sense to the user. Further, to display value of 61% at % Error at C1, it is being advised that by defining two structures, I can force the calculation to take display value of 110 in the % Error calculation at C1 level by using the cell editor.
    Has any body tried to achieve similar result as above by defining two structures and cell editor in the query? If so, can you please throw some pointers of how to define two structures in a query and how to force the % Error at category level to take the display value of 110 in the calculation? I have gone through the documentaion on structures and cell editor but the approach is not at all clear.
    Thanks in advance for your suggestions.
    Prasad
    Unilever Asia IT department

    Hi,
    Have u read aabout the Formula Collision.
    Take a look on this link .
    http://help.sap.com/saphelp_bw32/helpdata/en/d2/02223c5f00612be10000000a11402f/frameset.htm
    Read the Formula Collision, and let us know , whether your pb is solved by changing the Formula Collision of % error formula.
    With rgds,
    Anil Kumar Sharma .P
    Kindly assign points , If it really helps you.

  • Asset value for Calculation of Tax Depreciation

    We have been told that many of the assets created as of 1/1/2008 have a different (lower) tax value than their beginning book value.  Book value is correct for standard book depreciation.     Is there a process to update the tax value of assets created in SAP similar to the transaction AS92 used to update values for Converted Assets?
    It was suggested that we use the method of Unplanned Depreciation tcode ABAA with TTY 642/652 to change the tax value of the asset.  When I tested this I found the various tax depreciation methods were calculated based on the beginning book value for year 1 and not using taking the special depreciation into consideration until subsequent years.   This is using Depreciation Area 10, MACRS, Dep. Key M200.
    Is there a better method of altering asset book value for tax purposes or a better way to alter the tax depreciation calculation so it takes Unplanned Depreciation into consideration during year 1?
    Current simplified tax depreciation example:
    Beg. BV $1,000
    unplanned dep posted $100
    tax depreciation for year 1 $100
    tax depreciation for years 2-10 $88.88
    The preferred depreciation is $90 years 1 - 10.
    Thanks for your assistance,
    Jeff

    I think I had the cart before the horse on this problem.  The correct way to look at this is what is the best way to get the correct "Net Book Value" and not the correct tax depreciation posting as it never actually gets booked.  
    By knowing the incorrect Beginning BV, the rate depreciation is applied in year 1 and finally the desired Net BV value at the end of year 1 for tax purposes I am able to calculate the correct Unplanned Depreciation for tax to make everything work out correctly.
    correct beginning tax BV $1,200
    Beginning Asset Book Value $1,800
    depreciation $360 (20% of BV)
    Unplanned depreciation  $?
    Net BV for tax at end of Yr1  $960 ;  or  1,200 - (1,200*.2)
    With the know values above that makes my unplanned depreciation for Yr 1 to be $480.  Year 1 and all following years depreciate correctly after the Unplanned Depreciation is posted.
    I am marking this as resolved unless someone sees an error in my thinking.
    Thanks,
    Jeff

  • Cumulative values for any level of a time dimension

    Hello,
    I want to have a calculated cumulative member working for all levels of a fiscal time hierarchy, YTD, QTD, MTD, WTD.
    I can get a column to work for a specific level like that
    Aggregate
      PeriodsToDate
         [Calendar].[Hierarchy - Year to Week].[Fiscal Quarter YYYYQ],
         [Calendar].[Hierarchy - Year to Week].Currentmember
      ), [Measures].[Billing Net USD]
    However what I need is to show the to date whatever level of the dimension is displayed relative to that level. SO if all level are displayed, each intermediate level shows the cumul relative to that level.
    I Would really appreciate some pointers to an article or example on how I can do this. Thanks
    Thanks/Regards, Philippe Cand

    Hi P,
    One way to solve this (there are always many ways, each having varying levels performance and simplicity).
    CASE
    WHEN [Calendar].[Hierarchy - Year to Week].Level is [Calendar].[Hierarchy - Year to Week].[Fiscal Quarter YYYYQ] THEN 
    Aggregate(PeriodsToDate(
         [Calendar].[Hierarchy - Year to Week].[Fiscal Quarter YYYYQ],
         [Calendar].[Hierarchy - Year to Week].Currentmember), [Measures].[Billing Net USD])
    WHEN [Calendar].[Hierarchy - Year to Week].Level is [Calendar].[Hierarchy - Year to Week].[Fiscal Period YYYYP] THEN 
    Aggregate(PeriodsToDate(
         [Calendar].[Hierarchy - Year to Week].[Fiscal Period YYYYP],
         [Calendar].[Hierarchy - Year to Week].Currentmember), [Measures].[Billing Net USD])
    WHEN [Calendar].[Hierarchy - Year to Week].Level is [Calendar].[Hierarchy - Year to Week].[Fiscal Week YYYYWW] THEN 
    Aggregate(PeriodsToDate(
         [Calendar].[Hierarchy - Year to Week].[Fiscal Week YYYYWW],
         [Calendar].[Hierarchy - Year to Week].Currentmember), [Measures].[Billing Net USD])
    WHEN [Calendar].[Hierarchy - Year to Week].Level is [Calendar].[Hierarchy - Year to Week].[Fiscal Day YYYYDDD] THEN 
    Aggregate(PeriodsToDate(
         [Calendar].[Hierarchy - Year to Week].[Fiscal Day YYYYDDD],
         [Calendar].[Hierarchy - Year to Week].Currentmember), [Measures].[Billing Net USD])
        else null
        end
    Hope that helps,
    WHEN [Calendar].[Hierarchy
    - Year to Week].Level is [Calendar].[Hierarchy - Year to Week].[Fiscal Quarter YYYYQ] THEN Aggregate
      PeriodsToDate
         [Calendar].[Hierarchy - Year to Week].[Fiscal Quarter YYYYQ],
         [Calendar].[Hierarchy - Year to Week].Currentmember
      ), [Measures].[Billing Net USD] 
    WHEN [Calendar].[Hierarchy
    - Year to Week].Level is [Calendar].[Hierarchy - Year to Week].[Fiscal Quarter YYYYQ] THEN Aggregate
      PeriodsToDate
         [Calendar].[Hierarchy - Year to Week].[Fiscal Quarter YYYYQ],
         [Calendar].[Hierarchy - Year to Week].Currentmember
      ), [Measures].[Billing Net USD] 
    Richard

  • Change of base value for calculation of Excise.

    Hi All,
    I have a senario which needs to be maaped in SAP. Please help in maaping the senario.
    We are purchasing Oil from manufacturer like IOCL & HPCL. The contract is such that, the excise is calculated on the proce of the oil on the day the chalan has been created. Eg:-
    Contract base price is 100
    Ed@ 14.42%                14.42
    But on the day of despatch the base price is 110, hence the excise will be calculated on 110 only not on 100.
    So in PO we want to maintain a condition apart from basic price PBXX and PB00 on which only the excise will be calculated. The excise shouldnt be calculated on PBXX & PB00.
    So please tell me how to map this in pricing procedure using routine.
    Regards,
    Mohar

    Hi,
    I hope your requirement can be met using the manual Excise condition - JEXC in MM Pricing Procedure by maintaining  the subtotal as 5.
    Enter the JEXC condition in PO Item condition manually & enter the amount on which excise needs to be calculated.
    Based on subtotal 5 the value will flow to tax procedure automatically & excise will be calculated on the same.
    Hope its clear.
    Thanks & Regards,

  • Cumulative value calculation in script logic

    Hi,
      Assuming i have the following values:
    Acc1, time1 = 2
    Acc1, time2 = 10
    Acc1, time3 = 20
    Acc1, time4 = 30
      What script logic can i write such that the end results are:
    Acc2, time1 = 2
    Acc2, time2  = 12
    Acc2, time3 = 22
    Acc2, time4 = 32
      time1 could start from any month of the year, and the next month is always one month after the current month (i.e. if time1 = june, then time2 = july).
      Basically the above calculation involves some sort of cumulative effect. I would like to have this cumulative amounts stored in the database, hence i don't want to rely on measures="ytd" in the report.
    Cheers

    Hi Raja,
    You can get the daywise cumulative value for the user selected date range by creating a formula on the KF & turning on the 'Cumulated' checkbox in the 'Calculations' tab.
    --Priya

  • Subsequent use of cumulated value in query

    Hi All,
    We are using BEx Query Designer to create a query having one formula variable “Stock on Hand” as a cumulated value (along the columns).Now we need to use this cumulated value in another formula variable. Is this possible to do? If not could you please suggest an alternate for the same?
    Stock on hand (for any given week) = (Total Receipts – Total Demand) + Stock on Hand (for previous week).
    Inv. Carrying Cost (for any given week) = Stock on hand (cumulated values as above) * Per unit inv. cost
    Data for Total Receipts, Total Demand and Per unit Inv. Cost is present in the infocube at daily level. A sample report template has been given below:
    Product    Location       Week                      W1   W2    W3
       P1                L1        Total Demand           10     10     10
                                      Total Receipts           20      0       5
                                      Stock on Hand          10      0      -10
                                      Per unit Inv. Cost        2       2       2
                                      Inv. Carrying cost       20      0      -20
    Points assigned in advance for your replies
    Regards,
    Bansi.

    Hi PV,
    Thanks for the prompt reply. But we have already created two different formulae variables for the above requirement.
    The formula variable for Stock on hand is displaying the desired cumulative values. But the formula for Inv. Carrying cost is not able to use the display-value (cumulative value) of Stock on hand and it just uses the value corresponding to that particular week. For eg.
    for w2 if stock on hand =20 (cumulative value displayed on screen)
    and the original value of stock on hand for w2 = 0
    then the formula for Inv. carrying cost is using the original value(i.e. 0) but not the display value(i.e.20), whereas we want the cumulative value (i.e. 20) for our calculation.
    Any help in this regard would be highly appreciated.
    Regards,
    Bansi.

  • CONDITION BASE VALUE / ALT CALCULATION TYPE Pricing

    Dear All,
    I have a scenario where in I want the condition base value for calculating the value for a condition type to be based on
    Gross weight -  Net weight value of a material.
    Is it possible and if yse how do I acheive the same.
    Deepak

    Deepak,
    Alternative Calculation Type:
    Normally if you want to calculate a value you have to use a calculation type for determinating the value. This calculation type is either addition, subtraction or multiplication. Similarly SAP also has got a default calculation type in the control data of the condition type. There you have the options of either Qty based , Fixed Amount Based or Percentage based.  
    Here what happens is suppose if you define Your condition type that calculates the base price of a material on Qty based. Then the calculation will be done based on the quantity of the material. If the customer orders 10 Nos and you have maintained a unit price of 100 Rs for each material then the value determined is 1000 INR. Similarly if the discount condition type , you maintain the calculation type as %. This means if you maintain the value of 10  % in the condition record. Then this percentage is taken as the calculation type  and the condition value is determined.
    In some cases you have to forego the default calculation types and use the customer specific method for calculating a value. For ex if you are calculating the Freight charges for a Material . it depends on so many criteria like, the weight, volume  and also the minimum amount etc etc, in those cases, you forego the default value and then use the alternative calculation type in calculating the condition value against the particular condition.
    Alternative Condition Base value :
    If you have to calculate any value then you have to have a base value for it. For ex if you want to calculate the  discount of 10 % for a material then you have to have a base value on which this 10% is calculated. Normally you take the  condition value of the base price of the material to calculate the value.
    Now you don't want to take the base value and take other values as base value which are derived on some formulae. So you create a routine which will do the mathematical operations in the routine and derive you a value which is now used as the base value for calculating the condition value for a particular condition type.
    Reward poitns if u finds this helpful....
    Regds
    MM

  • Cumulative value in reports

    Hi all,
    Is it possible to get cumulative values for a column in a report ,using a querry or crystalreport.
    Also how we can populate data or rows for which there was no transaction.
    Thanks

    Hi,
    You may check this thread to find your solution:
    Re: Running Total in QLD
    Thanks,
    Gordon

  • V$sqlarea and cumulative values

    hi gurus,
    does v$sqlarea provide cumulative values for a SQL?
    for eg:
    Step 1
    SQL=select * from emp where empid=1
    elapsed_time = 2829
    Step 2
    SQL=select * from emp where empid=1
    elapsed_time = 2980
    1) if the values are cumulative, is there a way to find the elapsed_time for the last executed SQL as in step 2?
    2) is there any limit for the number of rows returned by v$sqlarea,(or when would be a particular SQL cleared from v$sqlarea)?
    thanks,
    charles

    SELECT sql_text,
          executions,
          CEIL (cpu_time / GREATEST (executions, 1)) ave_cpu_time,
          CEIL (elapsed_time / GREATEST (executions, 1)) ave_elapsed_time,
          CEIL (disk_reads / GREATEST (executions, 1)) ave_disk_reads,
          persistent_mem per_mem,
          runtime_mem run_mem,
          CEIL (sorts / GREATEST (executions, 1)) ave_sorts,
          CEIL (parse_calls / GREATEST (executions, 1)) ave_parse_calls,
          CEIL (buffer_gets / GREATEST (executions, 1)) ave_buffer_gets,
          CEIL (rows_processed / GREATEST (executions, 1)) ave_row_proc
    FROM v$sqlarea
    WHERE sql_text = 'select * from emp where empid=1'Regards,
    Mahesh Kaila

  • User wants to get the cumulative values based on his input.

    Hi
    I am working one FI Report; the out put values are Cumulative values for Current, Previous years. I developed and it fetches the data last 3 years Cumulative year’s data without any input FYMonth based on SAPexits and varible offsets. But user wants to put Fiscal year Month as input. So he wants get the cumulative values based on his input. For example, If his input SEP'2005(062005), Then Query gives the Output Cumulative Value (I.e., Sum of Total values of Form APR'2005 to SEP'2005)
    Please provide the solution…
    Thanks
    Mannev

    Mannev,
    You can try doing this.
    1. If the user input is fiscal period(2005006) , you can create a customer exit variable which will take the user value (i_step =2), and change the variable value to 20005001. (this is a simple code where tye last 2 digits are replaced by 01).
    if the user is entering calmonth, you can use FM - DATE_TO_PERIOD_CONVERT, to convert the month to fiscal period.
    2. You can create a rkf with restrictions on time char based on the customer exit variable and the user entered variable.
    -Saket

  • Not printing 'anwers' for calculations / formulas where no input values were given

    i have successfully created a document with formulas.  when i print the document, i want 'answers' of calculations where no values were put in, NOT TO PRINT (currently all 'answers' with no values put in print as '0'.  this makes the document look untidy.)  can anybody please help me with this?

    hi george
    thanks for the reply.  hope that i understood correctly, and that i was supposed to past your formule (as is) into the custom valaidate script box.  if not, my formula is:  box 1 + box 2 = box 3, where i do not want the value in box 3 to print if i have not added values for boxes 1 and 2. 
    i am very new to adobe, and really appreciate your help, and thanks for the patience.

  • Formula for calculating Quarter value in current calendar Year

    Hi All,
    I have a requirement where in i need to display values for Q1 of Current Calendar Year, Q1 of Previous Calendar Year,Variance in Value and % Variance in Value...Similarly for Q2,Q3,Q4.
    We have built the report directly from Bex Query from the SAP tab in Crystal Reports. The formula for Quarter1,Variances etc are defined in Bex Structures and i am unable to get 'em individually here rather i am getting them as a whole in a single object with the structure name. Now is there a way that i can define my own formula in Crystal Reports so that i can get the values for the constraints defined above???
    If yes please give me the syntax or an example formula so that i can work around.
    please Help,
    Thanks & regards,
    R.N

    What fields are you getting?
    or what is the data you are working with is it
    transID, date, value......
    or is it
    Q1, Year1, Value.......

Maybe you are looking for