Rolling sum in OBIEE 11 g

Hi All,
I have data in my report like this.
Month Sales rsum
01 100 100
02 200 300
03 400 700
05 500 500
Month 04 doesnt have sales so it is not showing in the report that why the rsum is now 500 as it starts the new row with 05 only.
The data should be like this.
Month Sales rsum
01 100 100
02 200 300
03 400 700
05 500 1200
any workaround for this.

Hi Deepak,
When i gave the example i forgot to add that i am showing the pivot chart in the report and showing the RSUM in Line Graph for 3 years..where i have year at the column and i have one dimension at the page section of the prompt.
So i m just showing the line graph where i have RSUM at the Vertical axis...Month at the horizontal Axis.
Sorry for the confusion

Similar Messages

  • Rolling Sum

    Hi all,
    My dashboard contains a prompt to choose a year which when selected needs to display the rolling sum of revenue for previous 2 years including the present.
    For instance if the the year chosen is 2008, i need to get the rolling sum of the Revenue'08 +'07+'06.
    The catch is i cant use AGO function since i need to perform Year to Date, QTD and MTD upon this rolling sum and OBIEE doesnt permit to use nested time series functions upon varying levels. I mean MTD ( Ago(Revenue, Year,1)) is not permitted.
    We tried this FILTER function to achieve this but it didnt help .
    FILTER(Sales."Fact - Sales"."$ Revenue" USING Sales."Fact - Sales"."Year id1" - Sales."Fact - Sales"."Year id2" BETWEEN -(1) AND 3)
    the corresponding query with physical sources is
    FILTER(sum(Fact_W_SALES_F.DOLLARS) USING Dim_W_DAY_D.YEAR_NUM - Dim_W_DAY_D_1.YEAR_NUM between -1 and 3)
    Someone please clarify upon this....
    thanks,
    Sid

    hi,
    for rolling sum try this following blog
    http://shivabizint.wordpress.com/2008/09/19/rolling-months-data-for-year-month-prompt-in-obie
    for your requirement try the following
    in dashboard prompt year column value assign to presentation variable var1.
    Measure column write the following formula
    (case when calendar.year=@{var1} then "Sales Facts"."Amount Sold" end )+(case when calendar.year=(@{var1}-1) then "Sales Facts"."Amount Sold" end)+(case when calendar.year=(@{var1}-2) then "Sales Facts"."Amount Sold" end)
    hope it works for you
    Regards
    Naresh
    Edited by: Naresh Meda on Nov 6, 2008 9:27 PM
    Edited by: Naresh Meda on Nov 6, 2008 9:32 PM
    Edited by: Naresh Meda on Nov 6, 2008 9:37 PM

  • Creating Rolling Sum Measures

    Hi,
    I am pretty new to OBIEE and am trying to create rolling sum measures (rolling 3 months sum ).
    Can anyone help me out in this. I searched on the web and couldn't locate the correct article.
    Thanks,
    Anand

    Hello user,
    Please use the below link which is posted by shiva for calculating rolling months....
    http://shivabizint.wordpress.com/2008/09/19/rolling-months-data-for-year-month-prompt-in-obiee/
    Hope its helpful.
    Thanks

  • New column - all-time rolling sum in Repository

    Hi all
    I need to build a new column in the repository.(ALL TIME ROLLING SUM TO DATE) and # Month Roll over on that.
    I am looking for a way to easily compute rolling sums (etc.) for ranges of dimensional values that are not included in the result set.
    I want to show a table of monthly unit count for 6 months:
    I have the values forall months ,starting from years 2000.
    Month unit Count
    Jan07 100
    Feb07 150
    Mar07 - 100
    Apr07 125
    May07 - 200
    Jun07 210
    In another column I want to show an all-time rolling sum of the transaction activity
    (sum the metric for all rows in the fact table <= the month in the row of the report).
    Month Unit Count Rolling Sum To Date (Balance) 3 month Rollover
    Jan07 100 3400
    Feb07 150 3550
    Mar07 100 3650 10600
    Apr07 125     3775 10975
    May07 200 3975 11400
    Jun07 210 4185 11935
    I tried RSUM for Rolling Sum To Date, but it dosent give rolling sum values above the considered result set time period.
    Immediate help is appreciated, kind of urgent help required.
    Thanks in advance.
    Edited by: user11939829 on Sep 16, 2010 10:20 AM

    Hi Deepak,
    When i gave the example i forgot to add that i am showing the pivot chart in the report and showing the RSUM in Line Graph for 3 years..where i have year at the column and i have one dimension at the page section of the prompt.
    So i m just showing the line graph where i have RSUM at the Vertical axis...Month at the horizontal Axis.
    Sorry for the confusion

  • Creating Rolling Sums in Reports

    If the underlying database does not having rolling sums computed for you, how can you report rolling sums?  I tried to use the runningsum function but have no dimension to make the sum reset.  If I have a table in the report like:
    Customer   Month   Sales 
    A               Jan       1
    A               Feb       1
    A               Mar       1
    A               Apr        1
    A              May        1
    A              Jun         1
    B               Jan        1
    B               Feb       1
    B               Mar       1
    B               Apr        1
    B              May        1
    B              Jun         1
    How do i get a running 3 month sum by Customer like:
    Customer   Month   Sales   3 Month RunningSum
    A               Jan       1           1
    A               Feb       1           2
    A               Mar       1           3
    A               Apr        1           1
    A              May        1          2
    A              Jun         1          3
    B               Jan        1          1
    B               Feb       1          2
    B               Mar       1          3
    B               Apr        1          1
    B              May        1         2
    B              Jun         1         3
    Thanks,
    Jimmy

    I found a solution. Create several variables such as Previous1Month = previous([MetricName])
    Previous2Month = previous([Previous1Month])
    Previous3Month = previous([Previous2Month])
    PreviousXMonth = previous([Previous(X-1)Month])
    To create a rolling 3 month, you just create another variable
    Rolling3Month = MetricName + Previous1Month + Previous2Month
    Of course this becomes very tidious with lots of metrics and variation of grains(wkly, monthly, quarterly...).  That's why you would want your underlying data model to do this and have the etl do all the dirty work. =)
    Thanks,
    Jimmy

  • Need to get rolling sum year wise in a query.

    Hi all,
    I have a table with monthid and amt columns. values are like
    200501 5
    200502 6
    200503 6
    200601 7
    200602 8
    200603 9
    Like this i have data for all months in year. now i need to get rolling sum year and
    month wise. the output should be like
    200501 5
    200502 11
    200503 17
    200601 7
    200602 15
    200603 24
    please help me out to write a query for this.
    Thanks,
    Chandu

    May be you want this
    dev>select deptno,ename, sal,
      2                    sum(sal)over(partition by deptno order by ename)as sum_on_dept
      3                 from emp;
        DEPTNO ENAME                                                     SAL SUM_ON_DEPT
            10 CLARK                                                    2450        2450
            10 KING                                                     5000        7450
            10 MI_LL_ER                                                 1300        8750
            10 T*_1NU                                                   2000       10750
            20 ADAMS                                                    1100        1100
            20 FO__RD                                                   3000        4100
            20 JONES                                                    2975        7075
            20 SCOTT                                                    3000       10075
            20 SH_*U                                                    3200       13275
            20 SMITH                                                     800       14075
            30 ALLEN                                                    1600        1600
            30 BLAKE                                                    2850        4450
            30 JAMES                                                     950        5400
            30 MARTIN                                                   1250        6650
            30 TURNER                                                   1500        8150
            30 WARD                                                     1250        9400
            30 DEEP                                                   3000       12400
               D.EV                                                     5000        5000

  • Rolling Sum by dynamic range of data

    Hello guys
    I have a report that looks like this:
    Year       Month           Local Cost
    2005        1                   100
    2005        2                   10
    2005        3                   200
    2005        4                   5
    2005        5                   30
    2005        6                   100
    2005        7                   50
    2005        8                   60
    2005        9                   120
    2005        10                  10
    2005        11                  200
    2005        12                  50
    2006        1                   10
    2006        2                   80
    2006        3                   20
    2006        4                   50
    2006        5                   300
    2006        6                   10
    2006        7                   50
    2006        8                   60
    2006        9                   150
    2006        10                 100
    2006        11                 200
    2006        12                  5Now I need to create a new column called 'Rolling 12 month cost' that for each month, it gives the total cost of that month plus the other 11 months' total prior, so the report should look like this:
    Year       Month           Local Cost        R12 Cost
    2005        1                   100              100
    2005        2                   10                110
    2005        3                   200              310
    2005        4                   5                  315
    2005        5                   30                345
    2005        6                   100              445
    2005        7                   50                495
    2005        8                   60                555
    2005        9                   120              675
    2005        10                  10               685
    2005        11                  200             885
    2005        12                  50               935
    2006        1                   10                845 (sum of month 1 2006 to month 2 2005)
    2006        2                   80                865 (sum of month 2 2006 to month 3 2005)
    2006        3                   20                Same idea as above
    2006        4                   50                Same idea as above
    2006        5                   300              Same idea as above
    2006        6                   10                Same idea as above
    2006        7                   50
    2006        8                   60  
    2006        9                   150
    2006        10                 100
    2006        11                 200
    2006        12                  5Can this be done?
    Please advice
    Thanks

    Update:
    Try this blog from Shiva
    http://shivabizint.wordpress.com/2008/09/19/rolling-months-data-for-year-month-prompt-in-obiee/
    Edited by: MSK on Mar 10, 2011 1:07 PM

  • Implementing a distinct within a sum in OBIEE

    Hi All,
    I am attempting to create a report in OBIEE with the following logic : -
    select sum (measure),type, id, year from
    select
    distinct measure, type, id, year
    from table A
    group by type, id, year
    I realize that OBIEE performs the inline view by default but how to do I perform a summation over this inline view ?
    Any help would be greatly appreciated.
    MN

    MN,
    See this
    http://gerardnico.com/weblog/2009/05/12/densification-with-obiee-logical-sql-spare-to-dense-data/
    or
    Inner Query
    Stimulate Nested query in OBI
    thanks,
    Saichand.v

  • Solution: rolling sum, window function, window sum

    <p> </p><p>HowTo calculate the sum for the last 12 month:</p><p>---------------------------------------------------------------</p><p> </p><p>Account:</p><p> </p><p>    salesglobal                       -->sales values stored</p><p>    sales_accum                   -->sales_accum = @ACCUM(salesglobal) ;</p><p>    last_year                           -->last_year = @MDSHIFT(salesglobal, 1, year, );</p><p>    sales_last_12_month   -->  </p><p>        sales_last_12_month= sales_accum            </p><p>+@SHIFT(last_year,1)            </p><p>+@SHIFT(last_year,2)            </p><p>+@SHIFT(last_year,3)            </p><p>+@SHIFT(last_year,4)            </p><p>+@SHIFT(last_year,5)            </p><p>+@SHIFT(last_year,6)            </p><p>+@SHIFT(last_year,7)            </p><p>+@SHIFT(last_year,8)            </p><p>+@SHIFT(last_year,9)            </p><p>+@SHIFT(last_year,10)            </p><p>+@SHIFT(last_year,11)            </p><p>+@SHIFT(last_year,12);</p><p> </p><p>best regards</p><p>Klaus Kurz</p><p> </p><p> </p><p>There is even a better solution:</p><p> </p><p>         sales_last_12_month=</p><p>                    @sumrange(salesglobal,@ILSIBLINGS(@currmbr(Time))) +</p><p>                    @sumrange(last_year,@RSIBLINGS(@currmbr(Time))) ;</p>

    Elset, you were right .. I just need to connect the index of the for loop to the array subset to update the values and that was all ... sometimes you just keep giving turns around on a simple solution ..
    I am going to attach the solution if somebody have something different or see something wrong just let me know.
    Thanks ..  
    Attachments:
    sum_window.vi ‏50 KB

  • Cummulative Sum in OBIEE 11g

    Hi,
    i have generated a report,need to create cummulative sum in my reports.can anyone give me the solution how to do.cummulative sum like
    col1 col2 col 3(cummulative_sum)
    A 5 5
    B 10 15(5+10)
    c 15 30(15+15)
    appreciate your response.
    Brgds,
    GN
    Edited by: GN on 31 Jan, 2012 3:48 AM

    Hi,
    You can use RSUM(Measure_Column).
    Regards
    MuRam
    NOTE- Please make this thread closed/or still facing issue so that it could help others.

  • Rolling variables in OBIEE

    Hi All,
    can any one suggest me, that how can we assing Session Variables for every quarter in a year( Rolling Prior 5 qtrs ). I need 5 trend revenues for every Quarter, i mean if i take QTR2 in 2011 then it will show all before 5 quarters in 2011 ( like QTR1 2011, QTR4 2010, QTR3 2010, QTR2 2010, QTR1 2010 ).
    i would appreciate if you could let me know.
    Thanks !!

    You could use the periodrolling function
    PeriodRolling(<<Measure>>, <<Starting Period Offset>>, <<Ending Period Offset>>)
    and 'pin' the measure on the quarter level
    PeriodRolling(<<Measure>>, -5,0)
    regards
    John
    http://obiee101.blogspot.com/
    http://obiee11g.com/

  • Rolling Month Sum required

    Hi ,
    I like to achieve a functionality using the RSUM or Timeseries function but any of this would not help .
    I have a report to show the sales for last 12 months in such a way that each month of that 12 months will show the sum up all sales for past 11 months + that month .
    My requirement is that standing on Month - Apr2009 I like to see the sales value sum from May2008 to Apr2009 ,whereas standing on May 2009 I would like to see the sum of sales for each month from June 2008 to May2009 (where each month sales is not rolling sum rather individual month total sales).While I am using TODATE function in OBIEE 10.1.3.4 version it is showing the sum from Jan 2009 to Apr2009 (like Month to date) but my intension is to show the aggregated value in single dervied column using any of the analytic function to calculate the past 11 months aggregated value + that months sales to be represent in a single metrics.
    The difficulty of achieving this by using MSUM is that it works on number of row to be displayed in report .Since I have a filter on date range from current date to currentdate-365 to show the relevant month in this range and to calculate the sum on basis of that.So using MSUM(Sales,12) for first month is not aggregating with past 11 months sales rather only showing that month sales data which is wrong .
    Any response to achieve this functionality would be helpful for us .
    Thanks in advance,
    D

    create an alias of the fact table in the physical layer
    join factalias to timedim in physical layer using complex join as
    TIMESTAMPADD( SQL_TSI_MONTH , -(12), Time.date) < fact.date and Time.date >= fact.date
    bring this aliasfact table table to logical layer in the same subject area, join to time dim (and othe dims) using a complex join.
    create necessary measures , such as 12monthsales
    move new table to presentation layer
    use this new 12monthsales columns in report
    so when you use time, it wont cut you off at the first month, but will go 12 month back for each month.
    hope this helps

  • Logical Columns - Running Sum & 3Month Rollover

    Hi All,
    Need to build a logical column.
    I have a column with number of units (count distinct) in RPD.
    I need to build a new logical column in the REPOSITORY , such that it has running sum values.... sothat when i pick this #units column and months column in the ANSWERS...I need to get roll over of all previous values for first month.
    Say Jan ---> XXXX units ( summation of all previous available units - few years)
    Feb----> YYYY units ( sum of till jan values & Feb units)
    Mar----> ZZZZ ...etc ( sum of till Feb values & Mar units) so on.
    Based on this newly built column I need to build another column of " 3 months roll over " column.
    Replies appreciated.
    Thanks in advance.

    Hi user11939829m
    So help me understand your new measures a little better. For the sake of this post, let's say your data is like so
    Month Year -- Units
    Jan 2010 -- 1
    Feb 2010 -- 2
    Mar 2010 -- 3
    Apr 2010 -- 4
    May 2010 -- 5
    Jun 2010 -- 6Then let's say you have a report with the above columns and the new running sum columns.
    Month Year -- Units -- Running Sum Units
    Jan 2010 -- 1 -- 1
    Feb 2010 -- 2 -- 3
    Mar 2010 -- 3 -- 6
    Apr 2010 -- 4 -- 10
    May 2010 -- 5 -- 15
    Jun 2010 -- 6 -- 21Now what exactly would your three months rollover be? Would the 3 month rolling sum = running sum for current month + running sum for last month + running sum for last last month?
    i.e.
    Month Year -- Units -- Running Sum Units -- 3 Month Rolling Sum
    Jan 2010 -- 1 -- 1 -- 1
    Feb 2010 -- 2 -- 3 -- 4
    Mar 2010 -- 3 -- 6 -- 10
    Apr 2010 -- 4 -- 10 -- 19
    May 2010 -- 5 -- 15 -- 31
    Jun 2010 -- 6 -- 21 -- 46Not sure what value such a measure would add. Or do you mean 3 month rolling sum would be the running sum for just the last three months (like below)? This makes more sense but in your description, you indicated that you'd build the 3 month rolling sum off of the running sum which confused me a bit.
    Month Year -- Units -- Running Sum Units -- 3 Month Rolling Sum
    Jan 2010 -- 1 -- 1 -- 1
    Feb 2010 -- 2 -- 3 -- 3
    Mar 2010 -- 3 -- 6 -- 6
    Apr 2010 -- 4 -- 10 -- 9
    May 2010 -- 5 -- 15 -- 12
    Jun 2010 -- 6 -- 21 -- 15 Is that what you are going for? Please elaborate.
    Best regards,
    -Joe

  • Rolling Months

    I created 12 rolling session variables to use to get 12 month rolling sums for my report. After creating the variables i made this filter to get sums for my GL balances (12 months ending).
    FILTER ("Facts - GL Balance"."Balance Amount") USING ("Time"."Fiscal Period End Date" BETWEEN VALUEOF(NQ_SESSION.PERIOD_START_11AGO) and VALUEOF(NQ_SESSION.PERIOD_END_00))
    this filter works only for 12 periods from the current date (NQ_SESSION.PERIOD_END_00) - how can I expand my range to include all the fiscal periods from 2002 to 2011, right now the report only gives me 12 periods from 10/31/2011 to 11/30/2010... for some reason my filter is limiting me, how can i circumvent this.... any help wld be apprceiated!!!!

    Thank you Deepak, you guided me correctly it is working for my 12/31 end of month dates bcoz it is rolling summed months from january. All other dates when selected from droplist are a sum from jan and not 12 months ago, i did all teh steps how can i now make the data correct- thanks
    Edited by: 846431 on Nov 2, 2011 9:21 AM

  • Measue aggregation not used when OBIEE hits MV

    Hi,
    We are facing 1 issue in MV implementation in OBIEE i.e. aggregation is not used for measure when OBIEE hits the MV and it's using the aggregation when OBIEEhits the base table.Ex. A is a column with aggregation sum when we pull measure A for ttime dimension when it's hitting MV it's not using sum in obiee query and when it's hitting base table it's uisng sum.Can anyone tell me how can we overcome this issue.
    Thanks,
    Amrit

    Hi Rajagopal,
    I am not sure if that is exactly accurate as I have other tables where the LTS includes a second or even third table but both tables are not included in the query.
    Example 1 - Table 1 joined to Table 2. Table 2 is setup as a LTS on Table 1. When a report is created off of Table 2, Table 1 is not included in the query.
    Example 2 - Table 1 joined to Table 2. Table 1 is setup as a LTS on Table 2. When a report is created off of Table 2, Table 1 is not included in the query.
    I have also verified that there is no other LTS on the Customer table but the issue still exists.
    Any other thoughts you can provide would be appreciated.
    Thanks

Maybe you are looking for