How to Calculate %age value

Hi All,
i have a query
I have data like below
cy
data
CY 2008
4290421
CY 2009
4069379
CY 2010
3979492
CY 2011
3940169
and i want output like this
cy
data
CY 2008
4290421
% change
-5%
CY 2009
4069379
% change
-2%
CY 2010
3979492
% change
-1%
CY 2011
3940169
for percent change the formula is in excel for %age change of CY 2008 to CY 2009 = (CY 2009 / CY 2008 -1 )*100
how we can calculate in SAP BO INFOVIEW 3.1 and it will run automatically in future also for 2012,2013 so on
Please Advice..
Thanks in advance.
Ranjeet

Hi Riaz,
Sorry for delay response
Please find the attachment
variable (formula) =([data]/Previous([data])-1)*100
the final result
if you want more information let me know
Thanks
Ranjeet

Similar Messages

  • ABAP-HR MODULE(HOW TO CALCULATE AGE & YEARS OF SERVICE)

    HI,
    HOW TO CALCULATE AGE & YEARS OF SERVICE means for example
    I AM USING PNPCE LDB.
    (1) whose age is greater than 52.833 years with 7.833 years of service, with annual rate of pay $170,000 or more, or
    (2) age plus employment service is 65 or more, with annual rate of pay of $ 170,000 or more.
    Note that the $ 170,000 parameter would be a variable that could change annually when this report would be generated. In the past, age and service value were determined as of the run date. The determination date would also be a variable that would change when the report would be generated.
    Thanks&Regards
    Rahul.

    Hi Rahul,
    This is the 2nd warning !!! Please... use the correct or most appropriate forum.
    The ABAP Objects Forum should be used for: ABAP Object definition and implementation including encapsulation, interfaces and inheritance in ABAP Objects.
    This thread will be moved from to .
    You're asking this question in two thread, so the duplicated thread will be deleted.
    Please have a look at [Forum Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement] before posting.
    Also read this thread Welcome and Rules of Engagement.
    Greetings,
    Marcelo Ramos

  • How to Calculate AGE by getting difference between two Date Fields

    HI Gems
    I need to calculate AGE from getting difference from two date fields. But when i am trying to wrte fromula as Current date - date1(some date field) then it is showing error.
    How can i get values.
    Thanks
    Manu

    You already asked this question:
    How to calculate AGE from two different date fields

  • How to calculate acquisition value for specified day

    Hi,
    in my z program I have a problem how to calculate acquisition value for my asset for specified day.
    Example:
    I have asset created 8.7.2008 with TTYPE 104 (External asset acquisition) with value 5950.
    30.11.2008 there is another TTYPE 272 (Retirement of current-yr acquis., w/o revenue) with value 950.
    So BEFORE 30.11.2008 acquisition value is 5950. After is 5000. Is there any function module (or something else) in SAP system where I can send asset number and date a it return to me acquisition value for that day?
    Many thanks for any answer!

    Hi,
    your suggestion means that I have to compute acquisition value by myself (sum all TTYPE 1** - sum all TTYPE 2**). So SAP does't provide such functionality (LDB ADA have it, because it can compute acquisitiob value for specific day)?
    Mant thanks for answer

  • How to calculate age in oracle

    Hi,
    T was trying do calculate age as on todays date in ORACLE but after a lot of brain storming i didn't get it.
    Kindly tell me how to calculate age as in years month days.
    For ex.. My DOB- 02-feb-1984 so my age should get as 27 Years 2 months 8 days
    How to do it.
    I tried this
    select
    TRUNC( months_between( sysdate, TO_DATE('02-02-1984','DD-MM-YYYY') )/12 ) Year,
    TRUNC( mod(months_between( sysdate, TO_DATE('02-02-1984','DD-MM-YYYY') ),12) ) Month,
    mod(months_between( sysdate, TO_DATE('02-02-1984','DD-MM-YYYY') ),12) /30 Days
    from dual
    but days are not calculating correctly...
    RGds,
    PC

    sorry..i didn't chck your query..it is right but give wrong answer..
    WITH got_months AS
         SELECT     TO_DATE('02-02-1984','DD-MM-YYYY')
         ,     FLOOR (MONTHS_BETWEEN (SYSDATE, TO_DATE('02-02-1984','DD-MM-YYYY')))     AS months
         FROM     dual
    SELECT     TO_DATE('02-02-1984','DD-MM-YYYY')
    ,     TO_CHAR (FLOOR (months / 12))     || ' years, '     ||
         TO_CHAR (MOD (months, 12))      || ' months, '     ||
         TO_CHAR ( CEIL ( SYSDATE
              - ADD_MONTHS ( TO_DATE('02-02-1984','DD-MM-YYYY')
                        , months
              )               || ' days'
    FROM got_months
    o/p
         TO_DATE('02-02-1984','DD-MM-YY     TO_CHAR(FLOOR(MONTHS/12))||'YE
    1     2/2/1984     27 years, 7 months, 9 days
    1 day more..1     it sud be.. 2/2/1984     27 years, 7 months, 8 days
    if i make correction with add_months like below..
    WITH got_months AS
         SELECT     TO_DATE('02-02-1984','DD-MM-YYYY')
         ,     FLOOR (MONTHS_BETWEEN (SYSDATE, TO_DATE('02-02-1984','DD-MM-YYYY')))     AS months
         FROM     dual
    SELECT     TO_DATE('02-02-1984','DD-MM-YYYY')
    ,     TO_CHAR (FLOOR (months / 12))     || ' years, '     ||
         TO_CHAR (MOD (months, 12))      || ' months, '     ||
         TO_CHAR ( CEIL ( SYSDATE
              - ADD_MONTHS ( TO_DATE('02-02-1984','DD-MM-YYYY')
                        , months
                        )-1
              )               || ' days'
    FROM got_months
    then o/p is..
         TO_DATE('02-02-1984','DD-MM-YY     TO_CHAR(FLOOR(MONTHS/12))||'YE
    1     2/2/1984     27 years, 7 months, 8 days
    correct but cdnt understand why sud -1?

  • How to calculate AGE from two different date fields

    hi
    I need to calculate AGE from two different date fields.
    Can some help me how to do, when i try to do substraction formula it is showing error.
    Thank You
    Manu

    Manu wrote:
    Hi
    Both fields are in date format only, i need to calculate no . of days between two different dates
    Thanks
    ManuThe reason for the question about the format of the column is because the simplest solution only works on DATE columns. Others have mentioned this here, but if you want the difference between two date fields, you can use this formula:
    TIMESTAMPDIFF(SQL_TSI_DAY, date_column1, date_column2)
    The above being said, you still didn't tell me what you did, or what error message you received. So again, if the above formula didn't work, what did you do? Where did you put the formula? What was the exact syntax you used? What was the error message you got?
    Please don't make us work more than we need to. Answer all the questions in your next post. Thanks.

  • How to calculate age in SQL?

    I have a table with DATE as one of the column.
    How do I calculate age?
    Thanks in advance
    -Shilpa

    michaels2 wrote:
    TryWell it still leaves leap year question open. If person was born on February 29, how old is that person on February 28 of a non-leap year? Your code considers it imcomplete year:
    SQL> var dob varchar2(20)
    SQL> exec :dob := '19960229';
    PL/SQL procedure successfully completed.
    SQL> select trunc ( (to_number (to_char (to_date('20090228','yyyymmdd'), 'yyyymmdd'))
      2                  - to_number (to_char(to_date(:dob, 'yyyymmdd'),'yyyymmdd'))
      3                  )
      4                / 10000)
      5            as "Age of Child"
      6    from dual
      7  /
    Age of Child
              12SY.

  • How to calculate Age in BEx query

    Hi,
    I need to calculate age in years based on person's date of birth and the key date that user of the report will enter.
    So, basically in my query I already have date of birth characteristic from 0PERSON InfoObject. I created ZAGE key figure and added it to the query that I would like to populate with person's age.
    So I know I have to enter some code in CMOD for calculated key figure ZAGE to get calculated based on birthdate and key date that user enters. Can somebody help with the code?
    thanks

    Hi,
    The variable should be in "Date" dimension. I have missed one important information in earlier mail.
    The processing type of the variable (user entry date) should be of "Customer Exit' and dimension (in last tab) should be "Date".
    By selecting this dimension, the variable input help screen also appears in calendar format to help user to select date instead of writing it in variable input.
    No need to write any custom code for this variable. We are selecting the "Customer exit" processing type to get Date dimension. In Normal user entry variables we can't get date & time dimension.
    "Ready for Input" should be selected so that user can enter date.
    I hope you can solve your issue now.
    Thanks for your feedback.
    Regards,
    Arun Thangaraj.
    Edited by: Arun  Thangaraj on Oct 8, 2008 8:48 AM

  • How to calculate usage value through measuring document.

    Hi,
    While creating Sales Order with reference to a Contract i need to update the usgae value in the Order Quantity ( RV45A-KWMENG ) field (at line item level).
    Can you help me calculate usage value through measuring documents for equipment over a period of time.
    Is there any function module for the same?
    Thanks.

    Hi,
    To determine the usage value of a an equipment I had followed the following.
    From table STPO, check if the material receipted belongs to a standard BOM (STLTY='S')
    If yes, record the BOM (STLNR)  and the BOM item node number (STLKN)
    From PLMZ table, select the task list type (PLNTY), the key for task list group (PLNNR), the group counter (PLNAL), the task list node number for operation (PLNKN),   if the record is not flagged for deletion (LOEZ)
    From PLFH table, select the object type of the CIM resource (OBJTY), the object id of the resource (OBJID), the usage value (EWVGW) if the record is not flagged for deletion (LOEZ)
    From CRVE_A table, select the equipment number (EQUNR)
    The result of this selection will be all the tools which can be used for the production of the material receipted.
    The measuring point for this or these equipment(s) will be selected from equipment number and EQUI table
    The result of this selection will be all the measuring point to update.
    Create new measurement document for the selected measurement point (transaction IK11)
    Technically go as follows:-
    MAT = material receipted
    Select STLY, STLNR, STLKN from STPO table where IDNRK='MAT' and STLTY='S'
    If results exist
    Select STLTY, PLNNR, PLNAL, PLNKN from PLMZ where PLMZ.STLTY=STPO.STLTY and PLMZ.STLNR=STPO.STLNR and PLMZ.STLKN=STPO.STLKN
    And PLMZ.LOEZ<>'X'
    Select EWVGW, OBJTY, OBJID from PLFH twhere PLFH.STLTY=PLMZ.STLTY and PLFH.PLNNR=PLMZ.PLNNR and PLFH.PLNAL=PLMZ.PLNAL and PLFH.PLNKN=PLFH.PLNKN and PLFH.LOEKZ<>'X'
    USAGE=PLFH.EWVGW
    Select EQUNR from CRVE_A where CRVE_A.OBJTY=PLFH.OBJTY and CRVE_A.OJBID=PLFH.OBJID
    All the equipment number selected at this moment will be called EQUIP in the next steps
    EQUIP= Equipment number previously selected
    Select OBJNR from EQUI where EQUNR=EQUIP
    Select PARNR from IHPA where OBJNR=EQUI.OBJNR
    If PARNR = Vend then
    Select IMRC_POINT from equi where equnr=equip
    All the measuring points  selected at this moment will be called MEASP  in the next steps
    For each MEASP
    Insert into IMRG the new increment value  (USAGExMAT) in field CDIFF
    Remark: the field CDIFF is managed in floating point number, accurate to 8 bytes.
    I hope this is useful for you.
    Regards,
    Ankur Parab

  • How to calculate age based on current month and over the next 12 months in Webi 4.1

    Hi,
    I am working on a report where I need to show employees who turned 65 from the time the report is run to over the next 12 months.I have the 'Date of Birth' field available. I am using Bex Query as a data source and webi 4.1. How do I calculate this in Webi 4.1. I appreciate any help.
    Thank you,
    Charvi.

    Hi Charvi,
    Get the all employees who are all in 64 age bucket till yesterday.  Keep indicator for these employees.
    Then obviously these employees will be falling in 65 age in coming 12 months/365 days.
    Same you can get at Bex level also. Create formulae :
    if employee age = 64 then 1 else 0.
    (AGE = 64 * 1 + 0)
    Then create condition on this formulae as Value = 1.
    Revert back your feedback.
    Regards, Vijay

  • How to calculate aging iin query desiner in bi7.0

    Hi all,
    can any help me how to write a formula in bex  QUERY desiner bi7.0
    acullay i have service order creation date in my cube ERDAT and
    business requirements is calculate the aging
    i want to minus the current date with creation date and i need the result in DAYS
    i am new to BI .
    Regards,
    Raja

    Why ask same question again ????
    How to write a formula in BEX in bi7.0
    Create a formula variable of replacement path on service order creation date say ZSCRE
    Create a customer exit variable and populate sy-datum into it in the user exit of CMOD say ZSYDAT
    or
    There is one standard variable available as key date in BEX you can use that too.
    Create a formula or CKF  :
    Age days = ZSYDAT - ZSCRE.
    Hope this helps.
    Edited by: Praveen G on Sep 15, 2008 5:14 AM

  • How to calculate mean value of a matrix

    Hi... I ve one matrix of order (m*n). I need to calculate the mean value of this matrix. How to do this?
    let we consider the matrix as 4x4.(Row=Column=4) The resultant matrix i.e mean value matrix is 1x4(Row=4,Column=1). To read the row value simultaneously in order to calculte the mean value thro row.... ?  please help me out
    Example:
    Matrix A=1 2 3 4
                   5 6 7 8
                   1 3 5 7
                   2 4 6 8. 
    Mean value thro row would be:   10/4 [  (1+2+3+4)/4
                                                      26/4 [ (5+6+7+8) /4...Like this i ve to do..
    Please help me out

    Hi,
      See this attachment.....
    Thanks and regards,
    srikrishnaNF
    Attachments:
    Example_VI_BD.png ‏3 KB

  • How to calculate avg value in bex

    Hi all
    I have a requirement
    I want to run a query for a particular period say 0032005.
    in the query output value will display for all prior period in different column. for perod 003
    it will display value for 001 , 002 ,003. and
    at the last column  i want calculate the avarage for this 3 period. these should be dinamic.
    if i run this query for period 0052005. query will display value for period 001 ,002 ,003,004,005 and last column will display avarage for the 5 period.
    i am able to diaplay each prior period in different column that is fine. but i am not abel to calculate the avarage column.
    example
    selection screen :
    fiscal period : 0042005
    Query output
    Char 0012005 0022005 0032005 0042005   Avg
         88        99     77       66     (889977+66)/004
    Please any one know about please help with steps.
    Thanks

    I have a requirement
    I want to run a query for a particular period say 0032005.
    in the query output value will display for all prior period in different column. for perod 003
    it will display value for 001 , 002 ,003. and
    at the last column i want calculate the avarage for this 3 period. these should be dinamic.
    if i run this query for period 0052005. query will display value for period 001 ,002 ,003,004,005 and last column will display avarage for the 5 period.
    i am able to diaplay each prior period in different column that is fine. but i am not abel to calculate the avarage column.
    example
    selection screen :
    fiscal period : 0042005
    Query output
    Char 0012005 0022005 0032005 0042005 Avg
    88 99 77 66 (889977+66)/004
    I got the resolution as bellow.
    In the Characteristic Property Set it as Suppress Result Rows-> Never. For the key figure Set Calculate Result Rows-> Average of All Values.
    yes it is working fine . but there is a small problem in the column heading for this colume is displying as overall result. but values are displying as a avg value. how can i change it.
    why i ahve to create a text variable. please explain

  • How to calculate query value on extended range of data

    Hi,
    This is my first post, so let me greet all forum users. I'm reading the forum for few weeks and I'm really impressed with the force of this community.
    My question is based on some real problems but I'll ask in general:
    In a BEx query - is it possible (and how?) in a result cell to obtain value that is calculated based on some more extended range of infoprovider records than it results from all the characteristics related to that cell?
    The question is somehow about a reverse case to the restriction in Selection. I'm asking about a kind of 'extension' of selection.
    Example for the question follows (it is somehow simple, I put it here just to picture the problem, note: the question is more general!)
    cube: ch: 0CALMONTH, 0MATERIAL, 0PLANT
          kf: 0QUANTITY (ex. of outgoing deliveries)
    What I need is to obtain in any query the SUM(0QUANTITY) over all 0PLANT (this can lead to knowing the 'activity' of the specific plant by calculating the share. that activity can be calculated at diferent level of detail).
    The 'dream' query would look like:
    rows: 0CALMONTH, 0MATERIAL, 0PLANT      
    cols: 0QUANTITY  SUM_OVER_0PLANT
    resulting in ex:
    0CALMONTH  0MATERIAL  0PLANT  0QUANTITY  SUM_OVER_0PLANT  PLANT_ACTIVITY
    2005.01    00001      P100    10         30               1/3
    2005.01    00001      P200    20         30               2/3
    2005.01    00002      P100    30         70               3/7
    2005.01    00002      P200    40         70               4/7
    2005.02    00001      P100    50         110              5/11
    2005.02    00001      P200    60         110              6/11
    2005.02    00002      P100    70         150              7/15
    2005.02    00002      P200    80         150              8/15
    after removing drill 0MATERIAL:
    0CALMONTH  0PLANT  0QUANTITY  SUM_OVER_0PLANT  PLANT_ACTIVITY
    2005.01    P100    40         100              4/10
    2005.01    P200    60         100              6/10
    2005.02    P100    120        260              12/26
    2005.02    P200    140        260              14/26
    after removing drill 0CALMONTH:
    0PLANT  0QUANTITY  SUM_OVER_0PLANT  PLANT_ACTIVITY
    P100    160        360              16/36
    P200    200        360              20/36
    For this specific case I investigated several solutions:
    1) using formula & function SUMCT (Result). This has a drawback that Result for 0PLANT must be present in right place (bottom level) in the resulting query. I don't like this.
    2) SUM can be directly precalculated in the cube. Well, I'd prefer Bex only...
    Please keep in mind also following:
    1) there may be a need to refer to the data that is outside prompt/filtering/restricting range.
    2) I want to preserve all the OLAP freedom, so all the solution should be a query with some tricky formula/kf/??? to be used by user in any situation and producing right result.
    I hope I'm not demanding to much...
    (now after this long example please have a look at the question again!)
    Regards,
    Mirek

    Hi Ashwin,
    while using SUMCT I loose the freedom of OLAP. SUMCT calculates properly SUM_OVER_0PLANT only when the 0PLANT is the lowest drillin level. If this is not the case (ie. some other ch is the lowest level or 0PLANT results are suppressed) the approach won't provide right result.
    sure I will reward all helpfull posts.
    regards,
    Mirek

  • How to calculate the values

    Hi Experts,
    I have doubt, i have an internal table now i want to calculate the total for every group. How to do that?
    value          type
    5,439.01 ;    ZMP0
      509.60 ;     ZMP0
    4,749.26 ;    ZMP0
    9,053.95-    ZPNL
    732.70-      ZPNL
    66.30-       ZPNL
    18.10-        ZS03
    63.90 ;        ZS03
    According to the type i need a total for ZMPO, ZPNL, ZSO3 separately.
    how to do that?
                       5,439.01 ;    ZMP0
                         509.60 ;     ZMP0
                        4,749.26 ;    ZMP0
    ZMPO total =
                         9,053.95-    ZPNL
                          732.70-      ZPNL
                           66.30-       ZPNL
    ZPNL total =
                          18.10-        ZS03
                           63.90 ;        ZS03
    ZSO3 total =
    Like that i need, can any one help this?
    Regards,
    Mohana

    Hello,
    Use the COLLECT.
    DATA:
      wa LIKE LINE OF itab,
      itab_sum LIKE itab.
    SORT itab BY key.
    LOOP AT itab INTO wa.
      COLLECT wa INTO itab_sum.
    ENDLOOP.
    The itab_sum has the same structure like the itab where is the data to me summarized, and the wa has the line structure of the itab.
    Regards.

Maybe you are looking for

  • CUP 8.6, CUCM 8.6 for OCS RCC

                   hi we have the cup8.6, cucm 8.6 integrated to OCS for RCC. All dashboard and system checks on cup are ticked ok. However on user MOC client we get the following error : 'cannot connect to the phone system, the call control server may b

  • Enhancement - Accounting Document from Billing Document - change line items

    Hi Experts,        Our client has a requirement to display all line items(as shown in Billing document) along with the tax line in the Accounting document. I can explain it as below:       In VF01 transaction code: enter the delivery number.       Pr

  • Java in mac os x lion?

    I thought Java had been left out in lion. Why then do I still see the Java utility in the utilities folder?

  • How do i call c++ programs(with visual c++)in oracle?

    how do i call c++ programs(with visual c++)in oracle? how do i store results which produced by c++ programs to oracle? results include picture(*.gif,*.bmp,*.jpg)and some variables. please tell me a way.hurry!!!

  • Why won't MS Word '98 open?

    Hello to everyone.. My problem is this ... every time I go near Word, the screen freezes with the opening logo ie. "Word '98 for Macintosh" .. the watch icon comes up as if it's going to open it and can still be moved over the screen, but cannot be c