How to use a cumulative value in a formula

hi, experts
I have a question about how to use a cumulative value in a formula. Below is the example:
                        wk1   wk2   wk3   wk4   wk5....wk n
sales order        5       10    15      10      5
build plan          8       8     10      15     10
result                3       1      -4       1       6
result row is what I want to get, the formula is:
wk1 result = wk1 build plan - wk1 sales order
wk2 result = wk1 build plan + wk2 build plan - (wk1 sales order  + wk2 sales order)
wk3 result = wk1 build plan + wk2 build plan + wk3 build plan - (wk1 sales order  + wk2 sales order + wk3 sales order)
I've already ticked the cumulative in properity of the key figures. It seems like that the cumulative results only can display, but can't be used in formula. Could you please help me? Many many thanks !!

Hi
In properties of that formula, there is option called 'formula collision' there you select 'formula from compiting result'. I think this will solve the problem.

Similar Messages

  • How to use cumulative Value in a formula

    Hello Gurus,
    I would like to use the cumulative value in a query as part of a formula calculation. I have created a KF which is assigned a constant value 1. When displaying the KF I am cumulating it so for each row I am getting 1,2,3,4...etc. How can I use this cumulated value in a formula calculation?
    For example, in a column cumulative count is 1,2,3,4...etc .My requirement is ,i want to identify the record with number 36 , to do this i have created a formula with boolean Equal to function comparing with the required number, but the boolean result what am i getting is Zero instead of one(1).
    The reason i found behind the problem is, the cumulative count that we see is dynamically happening during the run time for display ,but the internal value is 1 only.
    Is there any other way to meet this requirement or am i missing anypoint?.
    Thanks.

    Dear Yaseen,
                To get the value in formula cumulative,after you have created the formula for that particular key figure,go to edit and click on tab "calculations".
    In that select overall result as 'count all values not equal to zero' and single result as 'count all values not equal to zero' .
    And mark the cumulative check box underneath.
    I hope you get the desired result and please do me favour .
    Sumit goomber

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

  • How to use dynamic database item in Fast formula

    Dear All
    How to use Element Pay value in Fast Formula
    Element Name: Transport_Allowance
    Input Values : Name Units User Enterable Database Item
    Pay Value Money No Yes
    Amount Money Yes Yes
    Balance Feeds : Value Name Balance Name Units
    Pay Value Transportation Amount Money
    Formula
    DEFAULT FOR ASG_SALARY IS 0
    DEFAULT FOR TRANSPORTATION_AMOUNT_ASG_RUN IS 0
    ALIAS ASG_SALARY AS Emp_Salary
    ALIAS TRANSPORTATION_AMOUNT_ASG_RUN AS Emp_Trans_Amt
    V_CALCULATED_SALARY = Emp_Salary + Emp_Trans_Amt
    RETURN V_CALCULATED_SALARY
    Using the above formula, I got only Basic Salary only
    How to get the Basic Salary + Transportation allowance in the return value
    Please help me..
    Thanks in advance

    Please check whether the priority of the element with which the fast formula is attached has a priority higher than the Transport_Allowance. If not then cahange the priority of the element to a prriority higher than Transport_Allowance.
    HTH

  • When do we use Non-Cumulative values?

    Hi BW Experots?
    When do we use Non-Cumulative values?How is it related with exception aggregation
    Please tell me .
    Thanks in anticipation.

    Hi,
    Taken from std, doc....
    A non-cumulative is a non-aggregating key figure on the level of one or more objects that is always displayed in relation to time. Examples of non-cumulatives include headcount, account balance and material inventory.
    http://help.sap.com/saphelp_nw04/helpdata/en/8f/da1640dc88e769e10000000a155106/frameset.htm
    Check this out...
    http://help.sap.com/saphelp_nw04/helpdata/en/80/1a62dee07211d2acb80000e829fbfe/frameset.htm
    Pls. assign points if this helps you.. ****
    Thanks,
    Raj

  • How to use the prompted value in the filter expression

    Hi
    Is it possible to use the prompted value in the filter expression?
    My requirement is that user will be prompted for a date field and I need to filter the records such that the records are displayed for the last 5 weeks from the date entered by the user.
    If somehow I know how to use the prompted value in the filter expression then this requirement is easy to be done. If this is possible, please guide me?
    If there are other ways to acheive the desired results then please suggest.
    Thanks
    -Jaz

    Edit: example added
    SQL> create table tb_test
      2  ( id number(5)
      3  , tot number(5)
      4  , mon_tot number generated always as (tot*15) virtual
      5  );
    Table created.
    SQL> insert into tb_test (id, tot) values (1, 5);
    1 row created.
    SQL> select * from tb_test;
            ID        TOT    MON_TOT
             1          5         75
    1 row selected.
    SQL> update tb_test
      2  set    tot = 15
      3  where  id = 1;
    1 row updated.
    SQL> select * from tb_test;
            ID        TOT    MON_TOT
             1         15        225
    1 row selected.

  • How to use cfloop index value as part of another variable

    Hello,
    I have a RATE form that first asks "how many rates will you
    be adding?" that answer generates a series of form elements based
    on the answer. You then have a form grid to populate, 3 values for
    each rate (price, code, name).
    This part works fine. The issue is now I need to INSERT the
    values into the table, so I need to use the INDEX value of the
    cfloop to recreate the amount (and names) of the fields in the
    INSERT statement. How do I escape, or re-create the evaluated form
    elements ( in which their count is #i# as the loop goes) when I
    need to evaluate for #i# AND evaluate for #form.sku_i_name# at the
    same pass?
    I am passing, for example, #form.sku_2_Name# where that might
    equal "Half Page". The number 2 in that variable was assigned
    during the form creation by the current index of a cfloop. Since my
    action (insert) page does not know how many (out of 50 possible)
    sku's are coming, how do I use the skuCount (another hidden value
    passed as well) to create a proper INSERT SQL command when I need
    to eval the form element and the index at the same time?
    Obviously #sku_#i#_Name# does not work, and #sku_i_Name# does
    not either... I know this can be done, and that I am just doing it
    wrong.
    Thanks for any help!

    bigbrain28 wrote:
    > Thank You, cfsearching! I don't quite understand 100%
    how it works
    As all three of us indicated you use array notation for this
    type of
    requirement. In ColdFusion you can use array notation or dot
    notation
    to access structure data. Almost all data in ColdFusion is
    now some
    type of structure.
    I.E. #Form['myField']# is the same as #Form.myField#.
    The advantage is that with array notation you can do things
    you can not
    do with dot notation. You can reference elements that have
    keys that
    are illegal variable names such as one with a space.
    I.E. #url['my field'] is allowed, #url.my field# would fail
    or course.
    And you can concatenate the key string as we did with your
    example.
    I.E. #Form['aString' & aVariable]#
    There are many powerful things one can do with this
    knowledge. One can
    access record sets with array notations. This can allow for
    very
    sophisticated parsing of a record set.
    I.E. #myQuery['column'][row]#
    You can dynamical call a variable. Thus creating dynamic code
    that does
    not even need to know what variables exist until run time.
    I.E. #variables[anyName]#
    This just scratches the surface.

  • How to use the updated value in the same update statement

    Hello,
    I just wonder how to use the updated new value of other column in the same udpate statement. I am using Oracle 11.2, and want to update the two columns with one update statement as following:
    create table tb_test (id number(5), tot number(5), mon_tot number(5));
    update tb_test set (tot = 15, mon_tot = tot *15) where id = 1;
    ...I would like to update both tot and mon_tot column, the value of mon_tot shall be determinted by the new value of tot.
    Thanks,
    Edited by: 939569 on 1-Feb-2013 7:00 AM

    Edit: example added
    SQL> create table tb_test
      2  ( id number(5)
      3  , tot number(5)
      4  , mon_tot number generated always as (tot*15) virtual
      5  );
    Table created.
    SQL> insert into tb_test (id, tot) values (1, 5);
    1 row created.
    SQL> select * from tb_test;
            ID        TOT    MON_TOT
             1          5         75
    1 row selected.
    SQL> update tb_test
      2  set    tot = 15
      3  where  id = 1;
    1 row updated.
    SQL> select * from tb_test;
            ID        TOT    MON_TOT
             1         15        225
    1 row selected.

  • How to use copy default values for material from vendor master in Account Group

    Dear all:
       In define AccountGroup for vendor ,there is a field named DURAS which means default values,who can tell me how to use it?
       Any informations are appreciated!

    Hi Katherine,
    I have tried using default value as B in the customizing
    If i maintain default values in the vendor master record, it will automatically adopt in the purchase info record.
    Here i tried using sales person & telephone no field in vendor master record & it automatically adopts to purchase info record.
    Region sales person and telephone no i have maintained in vendor master record, it automatically fetches to info record for the particular account group. I am not sure if there is any relation between vendor master and material master record.
    Regards
    Subbu.

  • How to use a characteristic value variable in a formula?

    Hi all,
    I have created a characteristic value variable (manual input) for 0CALDAY in a query to get the Start & End date. There is requirement in the report to display a KF showing the duration between Start & End Date.
    I have tried to create a Formula Variable with Replacement Path, Ref Char 0CALDAY. In the Replacement Rule, there is an option to Replace Variable With variable. However, I wasn't able to locate the variable I have created for user input.
    Any idea how to achieve this?
    Many thanks,
    Yoong-En

    hi,
    if you have the start and end dates as user entry then follow this
    1) create a formula variable with reference char as start date of the type customer exit
    2) create another formula with end date as reference char of type customer exit
    3) in the cmod write the code your logic should be in such a way the the value at the user entry should be passed on to this formula variable the same for end date code
    4) create a formula with ( start date formula variable - end date formula variable)
    you can use this code
    WHEN 'ZV_YRFKDAT'.(formula  variable name)
        IF I_STEP = 2. "after the popup
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
          WHERE VNAM = 'ZV_KEYDAT1'.(user entry variable name)
            CLEAR L_S_RANGE.
            L_S_RANGE-LOW = LOC_VAR_RANGE-LOW. "low value, e.g.YYYY (2006) part of key date (20060625)
            L_S_RANGE-SIGN = 'I'.
            L_S_RANGE-OPT = 'EQ'.
            APPEND L_S_RANGE TO E_T_RANGE.
            EXIT.
          ENDLOOP.
    repeat teh same for end date
    hope this helps
    Thanks
    krishna.y
        ENDIF.

  • How to use the prompt value in the report column

    Hi
    I have a report prompt column which is 'Adj Type' which holds values 10,20,30 and when user selects Adj Type = 10 then this value should be passed to report column.
    For Eg. Column 1 value is 10 and this should multiple with prompt value and the output should be 10* 10.
    Any thoughts how to capture the prompt values in report column for calculation.

    hi hsekar,
    1) Declare a presentation variable in prompt under the Set Variable section -->Presentation Variable -->P_var
    2) In Fx Table_name.Your_column * @{P_Var}
    @{P_var}{20} ( 20 is default value it will override when a user selects value in prompt
    Thanks,
    Saichand.v

  • How to use a table- valued function as a datasource for SSRS report?

    CREATE FUNCTION [dbo].[GetNetSheetRegionNetPerCapitaRow](@WeekBeginDate smalldatetime)
    RETURNS @RegionNetPerCapitaRow TABLE 
    (WTD1 DECIMAL(18,6),PYWTD1 decimal(18,6),percentDiff1 float,diff1 float,WTD2 decimal(18,6),YTD2 decimal(18,6),percentDiff2 float,Diff2 float,YTD3 decimal(18,6),PYTD3 decimal(18,6),percentDiff3 float,Diff3 float)
    how to use the above function as a data source for SSRS report instead of a stored procedure ?

    Hi,
    In the Dataset - > Query Type - >  Text - >
    SELECT * FROM [dbo].[GetNetSheetRegionNetPerCapitaRow](@WeekBeginDate)
    sathya - www.allaboutmssql.com ** Mark as answered if my post solved your problem and Vote as helpful if my post was useful **.

  • How to use interface return value in workflow task

    Hi all,
    My team developed a proxy(interface) to fetch a field from web application(Non SAP) through PI. i tested that interface in SAP, its working fine. Interface is having one input, one output.
    Input - from SAP(employee number)
    Output - from webapplication (manager number).
    In my workflow, i have to use that manager number in decission task. For that i created a task, but in that task, iam unable to use the class and method name which is mentioned above. its giving an error "Interface implementation IF_WORKFLOW does not exist".
    Please guide me, how to use that interface output in my workflow.
    Regards
    Arani Bhaskar

    "Interface implementation IF_WORKFLOW does not exist".
    This error is triggered because the class which you are using in the task does not have included and implemented the interface IF_WORKFLOW , if at all you want to use any class methods in the workflow, then that class must supprot the interface IF_WORKFLOW
    what you can do is 
    1. Include the interface IF_WORKFLOW in the class that you are using to fetch the manager number,
    2. Make the method as Static Method .
    3. Just implement all the methods , I mean just double click each method of the interface, clcik on pretty printer and save it, to just implement all the methods.
    3. Do the appropriate bindings .
    And finally just execute the txn SWU_OBUF and click Shift+F1.
    this will help you to retrive the manager number intot the workflow

  • How to use a colum value as background color in a report template

    I need to use a colum value as background color of report template
    es.
    <td style="padding:0px;border-bottom:1px #cccc99 solid;border-right:1px #cccc99 solid;font-size:8pt;background:??????;" #ALIGNMENT#>#COLUMN_VALUE# </td>
    I have a column named COLORE_VAL1
    I try with:
    <td style="padding:0px;border-bottom:1px #cccc99 solid;border-right:1px #cccc99 solid;font-size:8pt;background:#COLORE_VAL1#;" #ALIGNMENT#>#COLUMN_VALUE# </td>
    but the value remain #COLORE_VAL1#.
    Please, help me.
    Barbara

    You need to change the processing type to customer exit of that variable.
    Now in i_step = 1 write the following code:
    Data:dt LIKE sy-datum,
          zper  TYPE /bi0/oifiscper,
          YR type /bi0/oicalyear,
          per LIKE t009b-poper.
    IF i_step = 1.
    WHEN 'X_FSCPRC' .---User input variable based on cmod.
          dt = sy-datum.
          CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
            EXPORTING
              i_date         = dt
              i_periv        = 'M3'---Give the fiscal year variant                             according to your system
            IMPORTING
              e_buper        = per
              e_gjahr        = yr
            EXCEPTIONS
              input_false    = 1
              t009_notfound  = 2
              t009b_notfound = 3
              OTHERS         = 4.
          IF sy-subrc = 0.
    Concatenate YR Per into Zper.
            l_s_range-low = Zper.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            APPEND l_s_range TO e_t_range.
          ENDIF.
    endif.

  • How do I get cumulative value

    hi,
    I have table with columns as Employee_id,Salary,Commission.
    I need query which will show total sal of each Employee_id and cumulative value of total.
    Thanks
    Ram

    select empno,
    sal,
    sum(sal) over (partition by null order by rownum rows unbounded preceding) running_total
    from emp;
    ordering by rownum in the partition clause is also another way thereby allowing one to order in any other way for reporting.
    --Samson                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • Function returning SQL query for mutiple series in a chart

    Hi, I would like to know if there is a way to specify a single PL/SQL function returning the queries for multiple series in a 2D Line Flash Chart. I have multiple series in my chart that has different values in the where clause. I can write a PL/SQL

  • Integral function-why it can not run

    Hi all, I am trying to write a code to draw a graph and calculate an area under the graph of sin function. When I run the code, it is working, but when I try to displace the GUI, there are two errors. - the graph did not appear in the GUI. It should

  • Footer not staying at the bottom of the content

    I am making a new website -- tomperkowitz.com -- and the footer sticks to the bottom of the browser page leaving a big white space when the browser window is taller than the content. I would like the footer to remain at the bottom of the content (lik

  • How do I get reminders to sync between my iPhone and iPad?

    I have imput information into reminders on my ipad2 but they do not appear on my iphone4.  What am I doing wrong?

  • HELP! Kernel Panic Issue When Shutting Down

    I cant figure out whats causing it to do it. Interval Since Last Panic Report:  60537 sec Panics Since Last Report:          14 Anonymous UUID:                    5FDFE808-4B52-4483-B8A9-3CFD08A530D9 Sat Jul 26 12:56:37 2014 panic(cpu 3 caller 0x2cea