Cummulative further calculations

Hi,
i am bex report requiremnt as below-
i have 3 cols.
1. current inventory bal
2. Cummlative total demand
3. bal = current inventory bal -  Cummlative total demand
Cummlative total demand is a KF which has the cummulative setting done in the query.
3,037.000 ---  900.000 = 2,137.000 CS  (This is correct)
3,037.000 --3,986.000 = -49.000 CS (This is wrong,it should be -949. What it is doing is 3037-3986 = -949 but adds 900 to it so the result appears as -949+ 900 = -49)
3,037.000 -- 12,432.000 = -5,409.000 CS (This is wrong,it should be -5409 What it is doing is 3037-12432 = -9395 but adds 3986 to it so the result appears as -9395+3986 = -5409)
Please tell how to acheive -949 and -5409.
Thanks for the help in advance-

Let me put the example this way-
3037.000 is the Current inventory balance and is same for all.
and Cumulative total demand is changing......
3,037.000 --- 900.000 = 2,137.000 CS (This is correct)
3,037.000 --3,986.000 = -49.000 CS (This is wrong,it should be -949. What it is doing is 3037-3986 = -949 but adds 900 to it so the result appears as -949+ 900 = -49)
3,037.000 -- 12,432.000 = -9395.000 CS (This is wrong,it should be -5409 What it is doing is 3037-12432 = -9395 but adds 3986 to it so the result appears as -9395+3986 = -5409)
Please tell how to acheive -949 and -5409.

Similar Messages

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

  • What is the use of Alternative Calculation Type =2 and 4

    Dear Friends
    In pricing procedure in gross value, Net value for Item and Net value has Alternative calucation type is 2.
    What is the use of it?
    Without using it these value line are also fetching net value then what is the work of it. Please give me detail information with its effects in pricing condition tab page in sales document.
    Thanking You
    Arun

    Arun biswal,
    Correct Biswal. We have at varoius stages within Pricing procedure the "net value" which is calculated. Not only the alternative calculation type "2" is used if you notice carefully they are stored as subtotals at various levels.
    For Ex Gross Value  --> Subtotal =1 --> Calc type = 2
    similarly for Net value for Item --> Subtotal =2 --> Calc type = 2
    Net value 2 --> Subtotal =3 --> Calc type = 2
    See, these are used to calculate the net value at various levels in pricing. The calculation Type has got a set of routines that will facilitate us in pricing. SAP has provided certain clauclated formulas or routines to facilitate us during calculation within pricing . Here the "2" is used for calculation without tax and store it as subtotal and display it or use it for further calculations.
    We can use this "netvalue" amount for further calculations. It is used for clarity purpose when you issue a statement to customer. (like Confirmation order) at various levels like discount amt involved, Freight involved, Rebate amount invloved.....
    Even without this Calc type or using sub total u can proceed....
    Finally we have  TOTAL  --> Subtotal =A --> Calc type = 4
    In the above line we have Calc type as 4, which means when you use TAX this calc type is used .
    Routines are used to facilitate your process....
    Regards
    Sathya

  • Local Calculation (Summation) in query doesn't display correctly in web

    Hi All,
    I have been working on a complicated query where I have formulas that perform calculations.  I then Hide these formulas and use them in another formula for further calculations.  The new calculations I then use local summation to basically just add the columns values and come up with an overall result.  Works perfect and is displayed perfectly.
    Problem is now in the web.  Either using a Pie Chart or just simply an Analysis item, the values are not displayed correctly at all.  The Pie Chart only displays the first row of data (not the overall result...which is a local summation...which is what I would prefer) and suprised that the Analysis item doesn't basically display what the query does.  I'm guessing it has to do with this local calculation.
    Can someone explain this behavior?
    Thanks.

    Anyone any ideas?

  • Calculating total time.

    I'm somewhat new to using spreadsheets. Basically I just want to keep track of the time I spend doing a particular job. So I'm tracking my start time, end time, and then I want to calculate the total time spent. Thanks.

    Yes, I thought about that. But if you start at say
    9pm and end at 2am you would get the incorrect result
    of 7 hours. I think I have to convert the time to
    something else before the math takes place. But I'm
    not sure how that would work.
    I'm not sure how you managed to subtract 9pm from 2pm and get 7 hours. When I try 2am - 9pm, I get #VALUE!, as AppleWorks reads both 'times' as text, and cannot use Text values in a formula that requires numbers. AppleWorks is a bit fussy on what it considers to be a number.
    Using the default alignment, you can recognize what AppleWorks thinks is a number—it will be aligned to the right of the cell—and what AW considers to be Text—it will be aligned to the left of the cell. In the case of Time, you're better off using the 24 hour clock, and entering one minute betore 2pm as 13:59.
    The Mac clock's unit of time is the (24 hour) Day, and all times entered are regarded as the portion of one day that has elapsed up to that time. When you do the subtraction, the result is also a time of day. For start and end times within the same calendar day, simply doing the subtraction will give a result that can be read as the (correct) elapsed time. For the example times you gave, the 'correct' result is also visible:
    02:00 - 21:00 = 05:00
    But the actual numbers behind that 05:00 result and the two times used to get it are the portion of the current day that has passed up to each of the times entered, and the difference obtained when you do the subtraction:
    0.0833 - 0.8750 = -0.7917
    If you only want the (readable) result for a single day, that's not a problem. But if you want to add the results to get a total time for a week, you need to (make AppleWorks) do some additional math. In simplest terms, you need to add 1 to the end time if the end time is on the calendar day after the start time. There's an explanation of this below, which you should read for a better understanding of Time and the Mac, but which isn't necessary to use the formula.
    The formula assumes your start time is in column B, your end time in column C, your formula reporting time worked is in column D, and that you will enter times in rows 2..6, and calculate the week's sum in D7
    Enter in D2, and fill down to D6: =IF(C2,C2-B2+(C2<B2),"")
    Format these cells to display as Time.
    Enter in D7: =24(SUM(D2..D6)) —to report the result in hours (eg. 25.678)
    Format the cell to display as Number, General.
    or
    Enter in D7: =INT(24(SUM(D2..D6))&":"MINUTE(SUM(D2..D6)) —to report the result as hours and minutes
    Note that the second option for D7 produces a text string which will not be useable in further calculations.
    This is Text, so no Number formatting is necessary.
    Regards,
    Barry
    Time and the Mac
    The Mac clock tracks time in Days and Fractions of a Day, starting at midnight, January 1, 1904.
    Nine PM today, May 8, 2006, represented as a decimal number, is 37383.875. Two AM tomorrow, May 9, 2006, is 37384.0833333333.
    An AppleWorks spreadsheet cell (or database field) formatted to display as Time will ignore the whole number part of those numbers, and interpret the decimal fraction part as Time of Day, and display the result in the Time format you have chosen for the cell.
    A cell (or field) formatted to display as a Date will ignore the fractional part of the number, and display the whole number part in the Date format you have chosen.
    When you enter a time, the result is the time of day on January 1, 1904. When calculating elapsed times where start and end times cross the midnight boundary, you need to add 1 (day) to the result to compensate for the change in day and get a result that can be used in further calculations. That's what the "+(C2<B2)" part of the first formula above does—adds 1 if "(C2<B2)" is TRUE or adds 0 it it's false.
    If you add times, the result is 'correct', but if the total reaches 24 hours, the displayed result will appear incorrect as a Time formatted cell ignores the whole number part of the actual result (eg. 27 hours, or 1.25 days), will display as 03:00, the same as 3 hours, or 0.25 days. You can convert the result to hours and fractions of hours by simply multiplying the result by 24, and displaying it as a Number rather than as Time.
    B

  • APPLEWORKS SPREADSHEET TIME CALCULATION

    CAN YOU CALCULATE TIME IN AN APPLEWORKS SPREADSHEET APPLICATION, I.E. I WANT TO SUBTRACT AN END TIME IN 1 COLUMN FROM A START TIME IN ANOTHER COLUMN TO DETERMINE THE TOTAL TIME? E.G, 9:15 - 9:10 = 5 MINUTES.

    Hi PW...
    Welcome to Apple discussions and the AppleWorks forum.
    If your MacBook is still under warranty, you might want to get that sticky CAPS LOCK key fixed. Most of us have reasonably good hearing here, so there's no need to SHOUT.
    Calculations with time are (more or less) the same as with any other numbers.
    For your example:
    Start time in A1: 9:10
    Stop time in B1: 9:15
    Formula in C1: =B1-A1
    The result is displayed in C1.
    But that display might not be what you expected.
    The default Number format setting (Number: General) will show the number in scientific notation (3.4722222e-3) if the cell width has not been changes since opening the spreadsheet.
    If the cell is wide enough to display AW's maximum 11 significant digits plus the decimal and the zero placeholder before the decimal, the number will be shown in standard (decimal) notation (0.00347222222)
    If Number format for the cell has been set to time, the result will show as one of the following 4 examples, depending which Time format has been chosen.
    12:05 AM
    12:05:00 AM
    0:05
    0:05:00
    The third of these seems most suitable to your needs. To set the number format of a group of cells, select the cells, then go to the Format menu and choose Number... (or press shift-command-N). In the Number format dialogue, click the Time radio button, then use the menu beside that button to choose 13:59. Then click OK.
    To set the format for a single cell, you may also open the dialogue by double-clicking the cell.
    If you want to display the result as "5 minutes", that's possible, using a more complicated formula, but has the disadvantage that the result is a mix of numbers and text, which can make it not useable in further calculations.
    =ROUND(((B1-A1)2460),0)&" minutes"
    Regards,
    Barry

  • Using column alias for calculations in same select list

    Hi All,
    I want to use a calculated column of query to create further calculated columns in same query using column alias. I have to do so because the calculation is too big to write it everytime.
    e.g.
    Select decode(Month, 1, Tran_January, 2, Tran_February, ....) as MonthTran,
    Month, Year,
    round(MonthTran/Intrest_rate, 2) as Amount <---(using previous alias)
    from ledger;
    Thanks in advance,
    Mona

    Probably the easiest way of doing this is to write an inline view, viz
    SELECT l.Month
           , l.Year
           , round(mt.MonthTran/l.Intrest_rate, 2) AS Amount
    FROM   ledger l
           , (SELECT x.pk_col, decode(Month, 1, Tran_January, 2, Tran_February, ....) AS MonthTran
              FROM ledger x) mt
    WHERE  l.pk_colunm = mt.pk_colunm
    ; If you have any criteria in a WHERE clause on ledger you shouldn't need to repeat them providing LEDGER does have a primary key column. You may need to tweak it a bit for performance, if LEDGER is a big table.
    Cheers, APC
    Cheers, APC

  • Calculations with Web Report results

    Hello, I'm just getting started with SAP BW and Web Reporting and that’s why I need some help. I have created a Web Report that shows the query results in a table. Now I want to make further calculations within the report. Therefore I have to access the results of the web report and I just don’t know how to do this. Maybe there are some javascript functions for that problem?

    A basic form of web report is to show the Bex report in Web table form, for that we assign the query to the table in the web table item.
    if further calculations need to be done using the already present keyfigures, then you can use the Calculated Key figure.
    Depending on the scenario you can also define the cell calculations, if you have structures both in the rows and columns.
    Refer to Web Table API to manipulate the cells of  the web table. This article using Web Table API could be helpful for you.
    Table interface doubt ?

  • Closing Stock on Particular Date(MB5B Tcode)

    Hi Experts,
    I need closing stock as on some particular date. For e.g. closing stock as on 28.02.2014.
    In my requirement i have to use that closing stock value for further calculations in a new customized report.I can see closing stock value by using MB5B tcode.
    Please suggest some way to get closing stock as on some date so that i can use that in my Report.
    Can i directly call MB5B transaction in my Report and get closing stock value?
    Thanks & Regards,
    Pankaj

    Hello Pankaj,
    In your Customised Report use MKPF and MSEG table
    MKPF ----->  Material and date range as the input
    Then Pass Material document number from MKPF to MSEG table
    MSEG ----->  based on material document number from mkpf
    Create Temporary  variable
    values comes from the mseg where have credit and debit entries
    if debit entry "S" then subtract the values of the Mseg table from the temporary variable1
    if credit entry "H" then Add the values of the mseg table to the temporary variable2
    finally Add the temporary variable1 and temporary variable 2 and get the total stock.

  • OLAP design questions

    We are planning on using Olap 9.2.0.6.0 against a 9.2.0.6.0 EE database.
    We have a Fact table with the following structure (let's call it the "deep" structure):
         D1_KEY (dimension 1 key)
         D2_KEY (dimension 2 key)
         D3_KEY (dimension 3 key)
         VALUE (fact value)
    The desired structure for end user querying is (let's call it the "wide" structure):
         D1_KEY
         D2_KEY
         VALUE_FOR_D3_VALUE1
         VALUE_FOR_D3_VALUE2
         VALUE_FOR_D3_VALUE3
         VALUE_FOR_D3_VALUEn
    We are able to create the wide structure for a reasonable number of values of D3. But, as D3 values become more (more than 500, more than 1000), it may not be practical to build the wide table. We are aware we could do this with dynamically built SQL statements, but the performance of "sum(decode(" statements suffers when you have a huge number of D3 values to do it on, and also, users would like to perform further calculations once data is available in the "wide" format, not to mention we're limited by the max number of columns in an Oracle database table (1000). We are hoping OLAP will help in this situation.
    The requirement is: let users choose what D3 values they would like to report on (5/100/1000), and the report is delivered in a wide format (one column for each D3 value).
    So, given this requirement, and a fact table with the "deep" structure, (and also given that I am fairly new to OLAP!), I have the following questions:
    (1) where do I start - I mean, can I create a cube with the D1, D2, D3, and the VALUE and then create a "wide" format in the cube? What are the main steps for doing that?
    (2) is OLAP still going to use the "sum(decode(" functionality to "widen" the data from the "deep" structure? If so, what is the performance impact if the number of values for D3 is in the range of 2000?
    Based on the answers from the experts, I am sure I will have some follow-up questions. Thanks for your time.

    Hi,
    When I first read this I thought you were trying to create a table based on the Query requirements. The fact table you have now will create a nice OLAP Analytic Workspace Cube which can render the correct report with a command such as:
    report down D1_KEY, D2_KEY across: D3_KEY VALUE
    You'll still get a report with one column for each value even if you select a large number of D3 members. This is also possible with Oracle Discoverer (OLAP), the OLAP Spreadsheet Add-In Tool, and likely Oracle Reports or other third party tools.
    Is OLAP still going to use the "sum(decode(" functionality to "widen" the data from the "deep" structure? - Actually when you load up the analytic workspace you can define the aggregation type, calc-on-the-fly or stored, or a combination of both. So performance will depend on how much needs to be calculated at query time.
    Hope this helps,
    Bill

  • How to merge key field from external source system with SAP R/3 master

    Hi,
    In SAP BW 7.0 system, our scenario is Master Data for 0GL_ACCOUNT is coming from SAP R/3 alongwith the Transactional data records for standard FI cubes. Then, one more set of transaction data is coming from external source system, a flat file, into another custom DSO(ZDSO_FI), which also has this GL Account field.
    This flat file's GL account, GL_file, has to be basically mapped/merged with the standard 0GL_ACCOUNT field so that at the time of loading the transactional data for custom DSO, ZDSO_FI (with transformation mapping GL_file > 0GL_ACCOUNT), system automatically refers to the 0GL_ACCOUNT master data to load these incoming transactional values, from the external flat file system. How can this be done?
    To illustrate the scenario, say I have 5 records in 0GL_ACCOUNT, loaded from SAP R/3 into SAP BW-
    0GL_ACCOUNT      Short Description     Source System
    100                                   D1                          R/3
    200                                   D2                          R/3
    300                                   D3                          R/3
    400                                   D4                          R/3
    500                                   D5                          R/3
    Now suppose if my flat file has following sample transactional data, to be uploaded in SAP BW  ZDSO_FI-
    GL_file      Key Figure1
    400          789
    200          567
    Then after uploading this transactional data in ZDSO_FI (with transformation mapping GL_file > 0GL_ACCOUNT), the 0GL_ACCOUNT data becomes as below-
    0GL_ACCOUNT      Short Description     Source System
    400
    200
    100                                   D1                          R/3
    200                                   D2                          R/3
    300                                   D3                          R/3
    400                                   D4                          R/3
    500                                   D5                          R/3
    So note that the system did not refer the incoming GL's from flat file, although the field is mapped to 0GL_ACCOUNT in transformation, to the already available master data. Rather created 2 new data rows for the GL accounts coming from external system. Because of this I am not able to perform the calculations common from standard FI cube and ZDSO_FI, with GL account as key field. I need to synchronise these data values based on GL Account to proceed with further calculation and am badly stuck.
    Request if anyone can please throw some light on how to achieve this seemingly simple requirement?
    Thanks in advance.
    Nirmit

    Better post this thread is in the [Enterprise Data Warehousing|Data Warehousing; forum.

  • How to use multiple visa read in one program

    hi
    i am working at Hameg HM8143 power supply i want to measure voltage and current simultaneiously and use the measured values for further calculations. for this i used two visa read blocks.
    >>>>>>the measured values are shown in the same visa read string however i want it to be shown sepetately,
    >>>>>>One of the VISA read block gives error. so i want to know how to use VISA read to get current and voltage simultaneously in seperate strings
    >>>>>>than how to convert strings to numbers  for using them for my calcultions.
    i am attaching screen shot as well
    Attachments:
    screenshot.JPG ‏164 KB

    you can not use a single serial to send 2 commands simultaniously?
    There is a single serial line so one command has to be before another.  This doesnt mena that you can not read from 2 seperate threads but will have to ensure that there is a locking mechanism to make sure that your queries are atomic.  In labview encapsulating all communications can be done with an action engine which will allow for concurrent execution with automatic blocking of your resource (serial device).
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • Formula to calculate SUM of multiple sheets of excel and the result to be stored in another excel sheet and pop up alerts for multiple rows

    I have a excel with multiple
         sheets with data as shown below
    SHEET 1
    A 1
    B 2
    C 3
    SHEET 2
    B 1
    C 2
    A 3
    SHEET 3
    C 1
    A 2
    B 3
    My
    query is splitted into 3 categories
    I want to have a formula to do math calculation such that data of "A" of SHEET 1 is  calculated with "A" of SHEET2 irrespective of the location of "A".
    When I include SHEET3, the formula should automatically identify the location of "A" or "B" or "C" and give the result corresponding to A, B or C. Since I want to bifurcate daily report and output printed. I want to use another
    excel for output. How to link multiple sheets of one excel and print the output of above in
         another excel?
    Assume, I have 4 SHEETS,  "SHEET 1", "SHEET 2", "SHEET 3" and "SHEET 4". Math calculation need to be done using all 4 sheets. If
    I include "SHEET 5", the formula should ignore SHEET 1  automatically and give the results of SHEETS 2 to 5. Similarly, if I include SHEET 6, SHEET 1 and 2 need to be ignored for further calculation and SHEET 3-6 need to be used. How to write
    such formula?
    How to get pop up alert for multiple rows, if a specific condition is hit?

    Maybe VBA Code should be a good option for you. I suggest you post you issue to
    Excel for Developers forum.
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.
    Thanks for your understanding.
    Best Regards,
    Wind

  • Retrieve data from a report or database to an input schedule in BPC for exc

    Hi,
    I am using BPC for excel ( v 5.1).
    I've created an Input Schedule(Input-1) using BPC for excel and sent data to the dB.
    I need this (Input-1) data to use it in a new Input Schedule(Input-2), for further manipulation.
    I need this data to be dumped in a sheet for further calculations in (Input-2).
    How can i bring this data?
    I created an input schedule(Input-2) and tried building an evdre in an excel macro to get it as a report of the 1st Input. But i was unsuccessful. I faced an error "ERR: Invaled KeyRange Header".
    Am i thinking in the correct way? Do we 've any other options to retrieve this data?
    Need your help to proceed....
    (Pretty soon, the environment is going to be with version 7.0)

    The macro i use to run when my workbook opens is as follows:
    Private Sub Workbook_Open()
        ActiveWorkbook.Sheets.Add
        Sheets(Sheets.Count).Name = "Dump_Sheet"
        Sheets("Dump_Sheet").Range("a1") = "Application1"
        Sheets("Dump_Sheet").Range("a2") = "=EvDRE($A$1,A14:B20)"
        Application.Run ("MNU_eANALYZE_REFRESH")
    End Sub
    Also I 've tried this too:
    Private Sub Workbook_Open()
        ActiveWorkbook.Sheets.Add
        Sheets(Sheets.Count).Name = "Dump_Sheet"
        Sheets("Dump_Sheet").Range("a1") = "=EvDRE(""Application1"",A14:B20)"
        Application.Run ("MNU_eANALYZE_REFRESH")
    End Sub
    Both of these gave me the same error code :
    #ERR : Invalid KeyRange Header

  • How to add a function field into the existing matrix report

    Hi,
    I have a matrix report , now i wanted to add one moe field into the matrix which is getting the value from a function , this function is a part of the ref cursor query(group) , i'm able to get the value from the function but it cannot display on the existing matrix report. i wanted to add this in the repeating frame which is printing down. how could i do this , looking for your help. thanks . bcj

    Here the scenario like,
    Data from Table_1
    NAME UNITS DAYS RATE
    AAA 10 1 1.2
    BBB 12 2 3.1
    AAA 20 2 4.1
    CCC 23 1 5.2
    Here, In the matrix report the NAME and UNITS are row fields and 'DAYS' is column field , RATE would be the cell field, and
    Data from Table_2 ,
    NAME BASIC
    AAA 2
    AAA 2
    BBB 2
    CCC 3
    In the report i have to display the 'BASIC' along with the NAME in row level ( repeating frame printing down),
    To get the multiple 'Basic' for each 'Name' using a ref cursor .
    and, using a function to do further calculation based on the basic value
    begin
    select basic into v_basic where name =:name;
    return(caluculated_value);
    end;
    and return the calculated value to the report. But at that time cannot accommodate the value in the matrix report with other groups frequency.
    looking for your valuable help. Thanks Bcj

Maybe you are looking for