How to calculate month wise da+basic

hello gurus,
am new to ABAP platform and the company gave tasks for developing a report . which display salary i.e., DA+BASIC for every month in particular year .
please help me :?:

Hi,
The best way to solve this is using the Ago function. With this you can create a logical column for the previous month. Then you will have 2 columns available with which you can do your calculations.
If you want to do this with a calculated item (don't know if the formatting will work for you), but you can make the calculation more general by using $1 for column 1 and $2 for column 2 in your calculation. So the relative columns ($x) will change with the columns in your report.
Regards

Similar Messages

  • How to calculate Month on Month growth rates in an OBIEE query?

    Dear all,
    I would like to ask your help on how to calculate Month on Month growth rates [(last month - previous month)/previous month*100%] in an OBIEE query. This ratio should be always calculated for the last 2 available months.
    I have the following query:
    Month0 | Month1 | Month2
    Product A 500 | 100 | 200
    Product B 600 | 300 | 150
    would like to add Month on Month column as following:
    Month0 | Month1 | Month2 | Month on Month(%)
    Product A 500 | 100 | 200 | +100.00%
    Product B 600 | 300 | 150 | -50.00%
    I tried to add a calculated item but it was not successful because I could not find out how to show only the calculated column as % with 2 decimals. Moreover, I would ideally prefer to have an automatic update but as far as I understood it can't be done in the calculated item automatically
    I also tried to add a new column in the column area and to filter the results for the last month, then for the previous month and then based on it to calculate the needed ratio but unfortunately it also does not work out.
    Thank you your hints in advance

    Hi,
    The best way to solve this is using the Ago function. With this you can create a logical column for the previous month. Then you will have 2 columns available with which you can do your calculations.
    If you want to do this with a calculated item (don't know if the formatting will work for you), but you can make the calculation more general by using $1 for column 1 and $2 for column 2 in your calculation. So the relative columns ($x) will change with the columns in your report.
    Regards

  • How to calculate ' Month - 1' in web intelligence 3.1?

    Hello All,
    While designing webi report I want to display previous month in the table.
    eg:--
    Aug -- Jul -- June -- May -- June .............like wise.
    I know the inbuilt function to calculate previous date... that is ...
    =RelativeDate(CurrentDate();-1)
    but how to calculate previous month ?
    Thank you.
    Regard's,
    Bhushan.

    Hi,
    So If consider Island Resort Marketing, you have the following Objects:
    Country, Sales Revenue and Invoice date in format(dd/MM/yyyy)
    Current requirement is:
    to display say a crosstab:
                    Aug-10    July-10     Jun-10     May-10   April-10    March-10   Feb -10  Jan-10
    US                 103         343            34          34          5676           5656          565       565
    France            45            454          454         454 ......
    Japan
    Please correct me if that is wrong.
    If this the case then...
    1. Create an Object Month of year- [invoice date] where year="2010" or any other will be fine.
    2. use [YearMonthname] =FormatDate([Month of year]);"dd/MMM/yyyy"  to get the month name.
    3. Use Substr([YearMonthname];4;3) to get only Month Name, call it [Month Name]
    4. Drag the object to the report and apply Custom Sort to it to appear in the order in which you want it to display.
    5. if Year required along with Month then concatenate with Year too.
    If this is not the case then let me know.
    Regards,
    Velly

  • How to get monthly wise asset depriciation

    Hi all,
       I am developing a report to show mothly wise depreciation for an Asset.
       In transaction  'AW01 - Assset Explorer' if we give company code, Asset number and Fiscal
    year we get the details of the depriciation in 'Planned/Posted Depriciation values'. I want to get
    the same result.
      By debugging the transaction AW01 i got the funtion module 'AM_SHOW_POST_DEPR' which
    gives the monthly wise depreciation value as output.
       But I am not getting what are the exact inputs which we need to pass to the funtion module.
       So pls help to find out monthly wise asset depriciation for an asset through the same funtion module or some other simple funtion module or through the tables.
    Regard's,
    Jean.

    hi,
    please refer this link
    How to get specific acquisitions and related depreciations?
    thanks

  • How to calculate average not through basic formula

    Can any bodytell me how to calculate averge of 96 rows in the quey designer  not by hard coding them.
    Is there any formula for creating it through formula or through calculations .
    And also how to calculate the maximum value and minimum value of the entire 96 rows  which is picking from a Z table -ZDC_2100.
    Iam having time blocks of 96 for 24 hrs each of  15Min.

    Hi,
    You can achieve using a counter at baselevel and use exception aggregation at query level...
    Also check the below links might be useful:
    http://help.sap.com/saphelp_nw04/helpdata/en/75/21054da1392649948e5b94e4fc4bce/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/e0173f5ff48443e10000000a114084/frameset.htm
    Hope this helps.......
    Rgs,
    I.Ravikanth

  • How to calculate monthly booked value in asset?

    Dear Experts,
    i have a query in asset accounting. we are developing a report in asset for calculating month till date and year till date value of asset under project or w/o project.
    Can anybody tell me the logic and fields and table for find out the monthly value of an asset means how much cost/expense booked for an asset under project or for asset w/o project?
    Regards
    Arun

    Hi,
      You can refer ANLA table and field POSNR for WBS element.
    Regards,
    B. Radhika

  • How to monthly wise  report in XL -Reporter

    Hi,
    How to define monthly  wise report &
    How to use date function in XL-Reporter.
    thanks.
    Ruheena Tasneem

    Dear Rubeena
    You can define parameter Date as follows
    In Advanced Report Builder Select Parameter
    a window will be opened, There Click New
    Name         Category         Type      Attribute            Default Value            Prompt
    Sdate         Literal             Date                                                              Enter Starting Data
    Edate         Literal             Date                                                              Enter End Date
    Regards
    Rashid

  • Month wise count

    Hi all,
    i am using oracle 11.2.0.3.0 version. i need to calculate month wise count. see below table, the date
    like 'MM-DD-YYYY'.
    claims from_date end_date member
    C1 11/06/2012 11/20/2012 M1
    C1 11/02/2012 11/20/2012 M1
    C1 11/04/2012 11/15/2012 M1
    C1 10/07/2012 10/15/2012 M1
    C1 09/08/2012 09/09/2012 M1
    C2 05/07/2012 05/08/2012 M1
    C2 06/09/2012 06/15/2012 M1
    I need the output like below
    claims from_date end_date member count(claims) count(member)
    C1 11/06/2012 11/20/2012 M1 3 3
    C1 11/02/2012 11/20/2012 M1 3 3
    C1 11/04/2012 11/15/2012 M1 3 3
    C1 10/07/2012 10/15/2012 M1 1 1
    C1 09/08/2012 09/09/2012 M1 1 1
    C2 05/07/2012 05/08/2012 M1 1 1
    C2 06/09/2012 06/15/2012 M1 1 1
    Thanks.
    Edited by: 980659 on Jan 8, 2013 8:07 PM

    980659 wrote:
    I need the output like below
    claims from_date end_date member count(claims) count(member)
    C1 11/06/2012 11/20/2012 M1 3 3
    C1 11/02/2012 11/20/2012 M1 3 3
    C1 11/04/2012 11/15/2012 M1 3 3
    C1 10/07/2012 10/15/2012 M1 1 1
    C1 09/08/2012 09/09/2012 M1 1 1
    C2 05/07/2012 05/08/2012 M1 1 1
    C2 06/09/2012 06/15/2012 M1 1 1
    Thanks.
    Edited by: 980659 on Jan 8, 2013 8:07 PMWith your changed output, you could use
    select claims, from_date, end_date, member,
            count(*) over(partition by  to_char(from_date,'yyyymm') order by null) claim_count,
            count(*)  over(partition by  to_char(from_date,'yyyymm') order by null) member_count
    from your_table;FROM_DATE and TO_DATE are expected in the same month

  • How to find the month wise Overall result

    Hi,
    calculating share percentage of order quantity  based on Overal result.
    if given the fiscal period range in the variable(for ex 001.2006 to 009.2006) Overall result considering sum of all Order quantity data between this range.
    But need to calculate share percentage based on month wise in this fiscal period range,for this regard should consider the sum of overal result in month wise.
    How to calculate the month wise overall result?
    regards,
    Hari.

    Hi Hari,
    You need to enable the results row for your Month char in the query. Then use a new formula with the function %CT to get the percentage share of individual values wrt to overall result of that month.
    Hope this helps...

  • How to calculate this column (Last Week of month)?

    I have a request where it shows some calculations month wise
    ex. This report is for Dec-2010
    reporting line | Declined Rate | Approved Rate | Last-Week Declined Rate |
    Report Asia---| ------20%----- | -----45%-------- | --------4%------ |
    Report Africa-| ------44% -----| -----21%-------- | ------12%-------|
    I am trying to calculate the Last Week Declined Rate column. The logic is just not coming to my mind.
    Can anybody suggest me how should I calculate this?

    Let's see. Running this report anytime after the previous month has closed...
    1) TIMESTAMPADD(SQL_TSI_DAY, (DayOfMonth(CURRENT_DATE))*-1, CURRENT_DATE) will give you the last day of the previous month...
    2) TIMESTAMPADD(SQL_TSI_DAY,DAYOFWEEK(TIMESTAMPADD(SQL_TSI_DAY, (DayOfMonth(CURRENT_DATE))*-1, CURRENT_DATE))*-1,TIMESTAMPADD(SQL_TSI_DAY, (DayOfMonth(CURRENT_DATE))*-1, CURRENT_DATE)) will give you the Saturday prior to the last week of the month.
    3) TIMESTAMPADD(SQL_TSI_DAY,1,TIMESTAMPADD(SQL_TSI_DAY,DAYOFWEEK(TIMESTAMPADD(SQL_TSI_DAY, (DayOfMonth(CURRENT_DATE))*-1, CURRENT_DATE))*-1,TIMESTAMPADD(SQL_TSI_DAY, (DayOfMonth(CURRENT_DATE))*-1, CURRENT_DATE))) will give you the Sunday of the last week of the previous month.
    Now that you have the beginning of the last day of the previous week, you can build your filter... It will be "between 3) and 1)" above...

  • T-Code for how to check depriciation month wise

    Hi,
    Please provide a T-Code or information how to check depriciation month wise and asset wise on a monthly basis.
    Thanks..

    Thanks for reply...
    My Requirement is this:----
    Suppose My Asset value is 50,00,000 in march 2009 and in April 2009, it is 30,00,000 (below 20,00,000 from March)...we are unable to identify, how that huge diff. comes in it... and in May it is 32,00,000 (only 2,00,000 diff.)...
    So, we want to examine that diff. b/w March and April months....
    How can we check the depreciation month wise.....
    regards....

  • How to calculate the salary of the employees when they are differentiated by monthly and hourly basis

    Hi all
    How to calculate the salary of the employees when they are differentiated by monthly and hourly basis
    How can we write the logic though sql
    Thanks in advance

    (case when pay_basis like 'HOURLY'
    then PROPOSED_SALARY_N*pay_annualization_factor
    when pay_basis like 'ANNUAL'
    then PROPOSED_SALARY_N*pay_annualization_factor
    end )
    I was actually trying to write the logic in this way but it was not calculating in correct format for hourly paid employees

  • How to Calculate column (Month, Year) from date or timestamp

    Hi,
    Name
    SQL Data Type
    Dimension
    Column Store Data Type
    Key
    Not Null
    Default
    Comment
    T_STAMP
    TIMESTAMP
    LONGDATE
    How to generate Month and Year from timestamp field in Analytic View.
    Please provide me some valuable input. I have searched SCN before posting this discussion.

    Hi KD,
    You can apply the following formulas in the expression:
    For Year :
    leftstr(string("Timestamp"),4)
    For Month:
    midstr(string("Timestamp"),6,2)
    Regards,
    Krishna Tangudu

  • How to get database growth month wise

    Hi All,
    Can any one help me getting the growth of production database month wise for the current year.
    I mean I need a script which will display the growth of my database month wise for the year 2010.
    Regards,

    hi,
    try something along the lines of this
    --Run the following create table to create segment info.
    create table stats$segment_info as
    select
      sysdate snap_time,owner, segment_name,segment_type , tablespace_name,sum(bytes) bytes from dba_segments group by owner,segment_type, segment_name,tablespace_name /
    -- Run the following once a calendar month via dba_jobs.
    insert into stats$segment_info
    select
    sysdate snap_time,owner, segment_name,segment_type , tablespace_name,sum(bytes) bytes from dba_segments group by owner,segment_type, segment_name,tablespace_name / commit;
    -- run the following report to get tablesapace growth
    column this_mon new_value this_mon
    column last_mon new_value last_mon
    column prev_mon new_value prev_mon
    select to_char(sysdate,'MON YYYY') This_mon
         , To_char(add_months(sysdate,-1),'MON YYYY') Last_mon
         , to_char(add_months(sysdate,-2),'MON YYYY') prev_mon from dual;
    column mins format 99999
    column size_mb heading '&&this_mon' format 99999 column size_mb2 heading '&&prev_mon' format 99999 column size_mb1 heading '&&last_mon' format 99999
    column growth heading 'Growth(%)|   in   |last month' format 9999.99
    select tablespace_name,
    --       to_char(snap_time,'MON YYYY') Month
           max(decode(trunc(snap_time,'MON'),trunc(add_months(sysdate,-2),'MON'),size_m,0))  size_mb2
          ,max(decode(trunc(snap_time,'MON'),trunc(add_months(sysdate,-1),'MON'),size_m,0))  size_mb1
          ,max(decode(trunc(snap_time,'MON'),trunc(sysdate,'MON'),size_m,0))  size_mb
           ,100*(max(decode(trunc(snap_time,'MON'),trunc(sysdate,'MON'),size_m,0))
         -    max(decode(trunc(snap_time,'MON'),trunc(add_months(sysdate,-1),'MON'),size_m,0)))
                     /max(decode(trunc(snap_time,'MON'),trunc(add_months(sysdate,-1),'MON'),size_m,1)) growth from (select  tablespace_name, snap_time
         ,sum(bytes)/1024/1024 size_M
    from stats$segment_info
      where snap_time > trunc(add_months(sysdate,-2),'MON')-2
    group by tablespace_name,snap_time) a
    group by tablespace_name
    order by tablespace_name
    /as far as I am aware this is database independent.
    regards
    Alan

  • HFR: How to calculate variation over last period for dynamic columns

    Hello Everyone,
                             How to calculate the period wise variation in a report where the period columns are dynamically generated from a range function? For example, the range function in the period column is &Current:Dec. What formula can I write in a calculated row so that the value is (Current  Period - Previous period)*100/Previous period ?
    Thanks,
    Sayantan

    You can add two more data rows.
    1. Use &Current
    2. Use relativemember function, select &Current, offset -1 (If you've a subvar for previous month that's the best)
    3. Add a formula row ([B]-[C]*100/[C])
    Regards
    Celvin
    http://www.orahyplabs.com

Maybe you are looking for