How to calculate the difference of two totals which are of the same group?

Post Author: mingli
CA Forum: Formula
Hello,
I have an existing report which has a group defined. The group generates two set of data, at the footer of each set of data, the total is calcuated. Now I need to calculate the difference between the totals. For example:
                         value
set 1
      item 1         100
      item 2         200
      item 3        300
set 1 total         600
set 2
     item 1         200
     item 2          20
     item 3        300
     item 4         40
set 2 total       560
difference       40
My question is: how can I do this? I'm thinking about create a formula. But the problem is, these two totals have the same field name. Could someone help me out?
Thanks.

Post Author: deejayw
CA Forum: Formula
Hi,I have a similar type of query...my Sets only ever contain two entries but there is an unknown number of sets.                        value
set 1
      item 1         100
      item 2         200
difference (item2 - item1) =   100
set 2
     item 1         200
     item 2          20difference (item2 - item1) =    -180
Set 3, Set 4, etc, etc I need to figure out how to calculate the "difference (item2 - item1)" total above. I am really confused by this and need assistance. Many thanks. 

Similar Messages

  • How can i use cmr between two EJB which are belong to different database?

     

    Perhaps, on the EJB's Entity tabs, in the Deployment settings dialog, you could make sure each bean references a different DB (Change the JNDI name, under Database settings).
    However, I don't know this for sure - you may have to use bean-managed persistence.

  • How to calculate the phase difference between two square wave (acquired from two channel in one DAQ)

    Hello everyone ,
     I need a quickly help that as below :
    I am trying use PCI-6220 to acquired six signals from one rotation encoder (channel A, channel B,channel Z ,and their non-signals) .The encoder out signals will be square wave and 4000pulses per revolution. I set it rotation at 300rpm speed. I need show every square wave of six out channels in waveform and measure the A-B phase difference to check if the value is correct (designed value should be 90deg) .
    I have no idea how to measure or calculate the phase difference of two square wave base on synchronizate to acquire these two square wave from two channel on the PCI-6620....
    Anyone can give a idea how to calculate the phase difference with two square wave ?
    Thank a lot and Thanks again...
    Tim

    Tim,
    Here is a simple rising edge detector for one channel.
    Lynn
    Attachments:
    Rising edge.vi ‏15 KB

  • How to calculate the hour difference between two dates?

    hi all,
    how to calculate the hour difference between two dates?
    eg i trying this...
    ((TO_DATE(TO_CHAR(GRNi.reference_date_4,'hh24:mi'),'hh24:mi') -
    TO_DATE(TO_CHAR(NVL(GRNi.reference_date_3,SYSDATE),'hh24:mi'),'hh24:mi'))*24)*60 Act_Hr
    Reg.
    AAK

    Hi
    To break the diff between 2 dates into days, hours, minutes, sec -- you can use the following:
    select to_char( created, 'dd-mon-yyyy hh24:mi:ss' ),
    trunc( sysdate-created ) "Dy",
    trunc( mod( (sysdate-created)*24, 24 ) ) "Hr",
    trunc( mod( (sysdate-created)*24*60, 60 ) ) "Mi",
    trunc( mod( (sysdate-created)*24*60*60, 60 ) ) "Sec",
    to_char( sysdate, 'dd-mon-yyyy hh24:mi:ss' ),
    sysdate-created "Tdy",
    (sysdate-created)*24 "Thr",
    (sysdate-created)*24*60 "Tmi",
    (sysdate-created)*24*60*60 "Tsec"
    from all_users
    where rownum < 50
    HTH
    RangaReddy

  • Hi frinds ,how to calculate the  totals in smartforms

    1)how to calculate the  totals in smartforms .

    Hi,
        To calculate totals and sub totals in sap scripts you can use subroutines.
    Say if you have to add the unit price (KOMVD-KBERT) then in the main window whereever tat value is picked write this routine
    /: DEFINE &TOT_PRICE&
    /: PERFORM F_GET_PRICE IN PROGRAM /:USING &KOMVD-KBERT& /:CHANGING &TOT_PRICE& /:ENDPERFORM
    Then write the variable where ever you want it to be printed (mostly it will be in footer window)
    Then create subroutine pool program and you have to write the code.
    FORM F_GET_PRICE tables int_cond structure itcsy
    outt_cond structure itcsy. data : value type kbert.
    statics value1 type kbert.
    Read int_cond table index 1.
    value = int_cond-value.
    value1 = value1 + value.
    Read outt_cond table index 1.
    outt_cond-value = value1.
    Modify outt_cond index 1.
    ENDFORM.
    regards..

  • How to Calculate the Space between two Characters in GDI + ?

    I am Drawing the set of characters in Graphics, by Calculating the points using GraphicsPath for each Character. I Need to know how to calculate the distance should be given between the two characters?
    I am using this code to generate points
    PointF [] pnts;
    var p=new GraphicsPath();
    path.AddString("A","Arial",(int)FontStyle.Regular,50,new pointF(0f,0f),StringFormat.GenericDefault);
    Matrix m=new Matric(1,0,0,1,0,0);
    path.Flatten(m,1,0f);
    pnts=path.pathpoints;
    i am getting the points for all characters using the above code.
    Now i am combining the two character Using the points generated by the above code.  Eg "AB"
    Help me to calculate the the character space should be given between two characters?
    Thanks in Advance...

    Hi,
    this link can assist you:>
    Professional C# - Graphics with GDI+ 
    Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP]

  • How to calculate the ratio between the maximum and minimum peaks of the two waves using two looping to find the value of SPO2?

    hello everyone,
    i'm rai from indonesia
    I have a final project about pulse oximetriy, I have some problems,
    how to calculate the ratio between the maximum and minimum peaks of the two waves using two while loops to calculate SpO2 ?
    My program image can be seen below predicament ?
    Attachments:
    spo2 akusisi data with filter lpf hpf smoot nilai max min ir merah.vi ‏249 KB
    spo2 akusisi data with filter lpf hpf smoot nilai max min ir merah.vi ‏249 KB

    Hi rai,
    I would appreciate it as kind of respect for forum participants if you would clean up your VI before uploading it (or images of its block diagram)…
    That being said:
    - Your inner while loops each run exactly twice. Replace them with FOR loops!
    - Lots of unneeded operations, mainly induced by ExpressVI usage. Is there a reason to convert to DDT and immediately convert back to 1D array?
    - You already calculate some Min/Max values. Ratio is just a division of two values…
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How to calculate the ratio between the maximum and minimum peaks of the two waves using two while loops?

    hello everyone,
    i'm rai from indonesia
    I have a final project about pulse oximetriy, I have some problems,
    how to calculate the ratio between the maximum and minimum peaks of the two waves using two while loops to calculate SpO2 ?
    My program image can be seen below predicament ?
    Attachments:
    spo2 akusisi data with filter lpf hpf smoot nilai max min ir merah.vi ‏249 KB

    Hi Rai,
    You should post this into the LabVIEW forum rather than Real-Time since this isn't a Real-Time application. Your post will see more replies in the LabVIEW forum. 
    As far as your question is concerned, you can write the max and min from the respective loops to a local variable to send the data out of the loops to a third loop or just do the calculation in one of the loops. This would be ideal if you're trying to do this while the loop is running. 
    -Jayk
    Applications Engineering
    National Instruments

  • How to calculate the variance in PO price history?

    hi
    i hav standard report ME1P, since i need to do some modifications in this program i copied to Y prgrm,,,'
    im getting all the values properly...
    but my prblm is im not getting how to calculate the variance? im not getting the logic behid it...
    can anybody expln me in breif plz....
    Regards
    Smitha

    Hi Venu,
    there is another way as well, however, you won't be able to see Variance and Variance% as a saperate keyfigure which is not under the period. Thats the reason I didn't mention it earlier.
    What you can do is, Drag the period to the columns, Now create a structure that has the two keyfigures std price, moving price. Here if you add Variance and Variance%, Then these CKF's would come under period as well, which you don't need. And the system won't allow you to add these CKF's outside this structure. The reason being because the interpretation of the data then wouldn't make any sense here. You can create a new structure as well with these CKF's but they would become a subpart of your previous structure.
    choose the required characteristics in the Rows section. Save it.
    Let us know, Sorry man, can't help u much at this problem.
    regards,
    Sree.

  • How to calculate the quota base quantity in quota arrangement?

    Hi all,
    As we all know, when a new supplier is added in the quota arrangment, we take the help of quota base qunatity so that the new supplier does not get any unfair advantage over the existing suppliers. Would you please help me on how to calculate the quota base quantity or on what basis the quota base quantity is calculated?*
    Regards,
    Ranjan

    Dear,
    Quota arrangement divides the total requirements generated over a period of time among the sources of supplied by assigning a quota.
    Quota u2013 quota is equal to a number and its represents the proportionate of requirements. Total quota of all the vendors is equal to 100% of requirements.
    This quota arrangement is also specific to material and plant level.
    Quota rating = quota allocate quantity + quota base quantity / quota.
    Quota based quantity used only when a new vendor introduced.
    In the as on date situation, the minimum quota ratings will considered as preferred vendor.
    The 2 vendors has 2 same quota rating, the vendor who is having the highest quota will considered first.
    In the running quota, a new source of supply is included. (In situation of short supply) including a new source not means to reduce the quota for existing.
    Regards,
    Syed Hussain.

  • How to calculate the row size

    Hi,
    I am having a table of 4 column. First column is varchar2(10), Second column is Number(5), Third column is char(10) and Fourth column is Number(12,2).
    Now how to calculate the size of each row. I want to know how much space it will take for each row.
    Thanx & Regards,
    Swarup

    For a complete discussion of storage requirements for different datatypes see the Oracle 8i Concepts manual.
    All Oracle documentation is available on-line via the 'Documentation' link on the OTN home page.
    Your Col2 NUMBER(5) will take 4 bytes if it holds a 5 digit positive or negative number.
    Your Col4 NUMBER(12,2) will take 7 bytes if it holds a number with 12 digits that is positive and will take 8 bytes if it holds a number with 12 digits that is negative.
    The following is from the Concepts manual Chapter 12 (Copyright by Oracle)
    Built-In Datatypes 12-9
    Internal Numeric Format
    Oracle stores numeric data in variable-length format. Each value is stored in
    scientific notation, with one byte used to store the exponent and up to 20 bytes to
    store the mantissa. The resulting value is limited to 38 digits of precision. Oracle
    does not store leading and trailing zeros. For example, the number 412 is stored in a
    format similar to 4.12 x 10 2 , with one byte used to store the exponent (2) and two
    bytes used to store the three significant digits of the mantissa (4, 1, 2). Negative
    numbers include the sign in their length.
    Taking this into account, the column size in bytes for a particular numeric data
    value NUMBER ( p), where p is the precision of a given value, can be calculated
    using the following formula:
    ROUND((length( p)+ s)/2))+1
    where s equals zero if the number is positive and s equals 1 if the number is
    negative.
    Zero and positive and negative infinity (only generated on import from Version 5
    Oracle databases) are stored using unique representations. Zero and negative
    infinity each require one byte; positive infinity requires two bytes.
    null

  • Ck11n:how to calculate the Quantity?

    Dear all.
    I use the tcode ck11n to create material cost estimate with quality structure.
    And input the parameter like below:
    Material = 600000-000000-0012
    plant = 1000
    Costing Variant = PPC1
    Costing Lot Size = 1
    After press return,the sap show the Itemization for material like below:
    20.11.2008                            Dynamic List Display                                   1
    Itemization for material 600000-000000-0012 in plant 1000
    Material             600000-000000-0012
    Plant                1000              
    Costing Variant      PPC1               Standard Cost Est. (Mat.)
    Costing Version       1
    Costing Date from-to 01.12.2008 - 31.12.9999
    Lot Size             1                  KARCarton
    Cost Base            1                  KARCarton
    Cost of Goods Manufactured
    ItmNo
    ItemCat
    Resource
    Cost Eleme
    Total
    Fixed
    Currncy
    Quantity
    Un
    1
    E
    J0103033   WC1      A03
    1001
    14,400.00
    7,200.00
    CNY
    3,600
    CAR
    2
    E
    J0103033   WC1      A01
    1001
    25,200.00
    10,800.00
    CNY
    3,600
    CAR
    3
    E
    J0103033   WC1      A02
    1001
    14,400.00
    7,200.00
    CNY
    3,600
    CAR
    4
    E
    J0103033   WC1      A04
    1001
    14,400.00
    7,200.00
    CNY
    3,600
    CAR
    5
    E
    J0103033   WC1      A05
    1001
    14,400.00
    7,200.00
    CNY
    3,600
    CAR
    6
    M
    1000 600000-000000-0013
    40000002
    9.00
    0.00
    CNY
    3
    CAR
    7
    G
    CC_AT01    41000001
    41000001
    2.25
    0.00
    CNY
    82,811.25
    39,600.00
    CNY
    At the first line,the Resource was "J0103033   WC1      A03",and the Quantity was "3600".
    I don't know why the Quantity was "3600" or where the Quantity come from?
    So I need someone tell me how to calculate the Quantity?
    Thank you so much.
    Regards
    Yoda

    Hi,
    Pl note the Item Category, " M "- Material - The 3 quantity has been picked up from BOM correctly.
    You are referring to Quantity 3600, which is against item category - E. Item category " E" means Internal activity allocation i.e the date flows through assignment to Routing. Check the Work center, Cost center & Activity types  J0103033 WC1 A03 1001.
    Now i think it is clear.
    Cheers !
    Siva
    Cost of Goods Manufactured
    ItmNo ItemCat Resource  Cost Eleme Total Fixed Currncy Quantity Un 
    1 E  J0103033 WC1 A03 1001  14,400.00  7,200.00  CNY  3,600  CAR
    2 E  J0103033 WC1 A01 1001  25,200.00  10,800.00  CNY  3,600  CAR
    3 E  J0103033 WC1 A02 1001  14,400.00  7,200.00  CNY  3,600  CAR
    4 E  J0103033 WC1 A04 1001  14,400.00  7,200.00  CNY  3,600  CAR
    5 E  J0103033 WC1 A05 1001  14,400.00  7,200.00  CNY  3,600  CAR
    6 M  1000 600000-000000-0013 40000002  9.00  0.00  CNY  3  CAR
    7 G  CC_AT01 41000001  41000001  2.25  0.00  CNY

  • Does anyone know how to calculate the impedance using waveforms

    does anyone know how to calculate the impedance using waveforms?

    studentproject wrote:
    the waveforms represent the voltage and current values across a capacitive load. I am trying to find out if there is a way to do automatic calculations using the inputs from the waveforms
    Hopefully a single sinusoid tone.  Otherwise things get really interesting.  Also know that impedance is based on the frequency.  I'll have to dig into this again.  I have not had to calculate an impedance in well over 10 years.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to calculate the previous year YTD balance in profit & loss statement

    Dear all,
    I would like to seek for advice on how to calculate the previous year YTD (Year to date) balance in profit & loss statement
    For example, if I enter May 2009, the YTD value should be a sum up of value from Jan to May.
    I have tried the current year YTD could be set in column selection dimension "financial period"
    FACT PER( Code = YearFirst(@Per):@Per )  Order By PER.Code Descending
    Then, I tried the previous year YTD in another column using
    FACT PER( Code = YearFirst(@Per-12):@Per-12 )  Order By PER.Code Descending
    But it failed -> Abnormally display three column, while the financial period I enter 200903 in parameter @Per
    Would anyone kindly help me on that?
    Regards,
    Simon Chiu

    Dear Jim,
    Thanks for your reply.
    However, the problems still cannot be solved.
    My expected output is 1 column listing the YTD value from previous year.
    I have tried two times using both the Code = YTD(@Per-12) and Code = YearFirst(@Per)-12:@Per respectively. However, the Excel display various column.
    I am using Financial Period 200903. In the last three column, it display the data in Financial Period 200901, 200902 and 200903 respectively.
    For the current year, the YTD is correct and show 1 column listing the sum of account in the Financial Period 200901, 200902 and 200903
    Would you kindly advice the code setting and how to set? Also, how I can access the syntax builder?
    Regards,
    Simon Chiu

  • How to calculate the unit for RATE?

    Hey All,
    I am not sure if there is something standard for this or not.
    I am calculating the 'Rate' by using 'Value/Amount' and 'Quantity' as follows -
    Rate == Value /  Quantity
    I need to calculate the unit for the rate as below -
    Rate unit == Value unit (Currency) /  Quantity unit (Base_uom) 
    (for example -
    if value is 1000 USD and quantity is 10 TO then Rate should come out as 100 USD / TO)
    Could anyone please suggest how to calculate the unit in this case?
    Many Thanks!
    Tanu

    Hi,
    Go through the below link it may give some idea
    http://help.sap.com/saphelp_nw04/Helpdata/EN/19/1d7abc80ca4817a72009998cdeebe0/content.htm
    Regards,
    Marasa.

Maybe you are looking for

  • Can I use same QT Pro key on two computers?

    I want to have QT Pro on my desktop and laptop but I don't wanna have any issues with the same serial number being used etc. Am I allowed to use it on both?

  • Current  date  in  add mode ?

    i want to show the current  date  in  add mode but it s not working is there any changes thats working properly. If oForm.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE Then             oEdittext = oForm.Items.Item("MrolVal").Specific             oEdittext

  • Delete a Wiki Page

    Can this page be deleted: http://wiki.archlinux.org/index.php/Ser - figuration It is rather old and title is misleading.

  • Changing position of iCloud Drive folder

    Sorry for my english. I want to know if it's possible to change the position of iCloud Drive folder in a different volume (not startup volume).

  • Safe to remove...?

    I was wondering if it would be safe to remove Adobe Premiere Pro CS 4 by drag-n-drop. When I installed Adobe Master Collection CS 4, I did not select to install it, however it still appears in my Applications folder and is hogging space. How can I ge