This Essbase discussion board is provided as a free service and dedicated to all the Essbase professionals out there!
  << Previous Topic | Next Topic >>Return to Index  

Rolling 12 Months Across Years

August 2 2012 at 2:56 PM
No score for this post
Edward 
from IP address 216.58.241.102

Has anyone ever come up with a solution to do a rolling 12 months sum or average that crosses years where the period and years are in different dimensions? The only thing I have come up with was a dynamic calc where the subvars set the end point and save off history. Would need this to be more like DTS. I suppose a CDF is in order.

 
Scoring disabled. You must be logged in to score posts.Respond to this message   
AuthorReply
Cameron Lackpour

71.175.252.246

Check out the @XRANGE function

No score for this post
August 2 2012, 3:34 PM 

http://docs.oracle.com/cd/E17236_01/epm.1112/esb_tech_ref/xrange.html

Search the board for this function -- there are a bunch of examples using this technique and others to do rolling sums, averages, etc.

One thing -- if you are doing this in Planning BegBalance is going to ruin your day.

Regards,

Cameron Lackpour

 
Scoring disabled. You must be logged in to score posts.Respond to this message   
Edward

216.58.241.102

Thanks Cameron!

No score for this post
August 6 2012, 1:58 PM 


 
Scoring disabled. You must be logged in to score posts.Respond to this message   
Stuart Game

90.202.78.210

Re: Rolling 12 months

No score for this post
August 2 2012, 6:04 PM 

Hi

Similar to Cameron but I've done this a few times using @CURRMBRRANGE. It does take several members which may be a slight downside (depending how many metrics you want to do this for) but I've always managed to do it using dyn calcs, where the account dimension is dense, so not too painful and it avoids the BegBalance issue in Planning that Cameron alluded too.

So for example you want 12 months rolling Sales.
Create 2 members:
SalesYTD = @SUMRANGE(Sales, @CURRMBRRANGE(Period, GEN, 4, , 0));
SalesEOY = @SUMRANGE(Sales, @CURRMBRRANGE(Period, GEN, 4, 1, ));

This assumes a Planning style period dimension as follows (so using GEN 4 gets you only the months, ignoring BegBalance):
Period
-BegBalance
-YearTotal
--Qtr1
---Jan
---Feb
etc

The first formula calculates the YTD value (from the first period to the period selected), the second formula calculates the value for the remainder of the year (period immediately following the period selected to the last period).

Finally create your 3rd and final member to bring it all together:
"Sales(12mth Rolling)" = SalesYTD + @PRIOR(SalesEOY, 1, @LEVMBRS(Years, 0));

You may need to wrap this in an IF statement, e.g. if your last period is Dec you may want:
IF (@ISMBR(Dec))
"Sales(12mth Rolling)" = SalesYTD;
ELSE
"Sales(12mth Rolling)" = SalesYTD + @PRIOR(SalesEOY, 1, @LEVMBRS(Years, 0));
ENDIF

Obviously depending upon how you calculate your rolling 12 month you can tweak each of the formulae above (some companies include the period in the 12 months, others do it on a trailing basis so July's 12 month rolling is actually July->PrevYr to June->CurrYr


Hope this helps
Stuart

 
Scoring disabled. You must be logged in to score posts.Respond to this message   
Edward

216.58.241.102

Very Nice, Thanks Stuart

No score for this post
August 6 2012, 1:58 PM 


 
Scoring disabled. You must be logged in to score posts.Respond to this message   
Current Topic - Rolling 12 Months Across Years
  << Previous Topic | Next Topic >>Return to Index  

RSS feed for this forum - http://www.network54.com/Forum/58296?xml=rss. Please email hypess (at) gmail.com, if you have any questions/feedback/issues.