Skip to Content
0
Former Member
Jul 10, 2012 at 10:40 AM

Rolling forecast - offset 12 (plus one year)

33 Views

Hi,

I'm struggling with a script for a rolling forecast.

I want to copy actual data from a time attribute "FCST_SOURCE = Y" to forecast data and offset the time with 12 (meaning one year).

So for example "actual data 2011.01" should become "forecast data 2012.01".

I tried using the tmlv formula, but failed. (*rec(expression=%VALUE%, tmlv(12, %SOURCE)).

So now i have the following script, which works, but is far from optimal.

Is there a simpler way to write this below script ? :-)

*XDIM_MEMBERSET CATEGORY = ACTUAL
*XDIM_MEMBERSET FORECAST = CONTRACT
*XDIM_MEMBERSET INPUTCURRENCY = EUR
//*XDIM_MEMBERSET TIME = BAS(2011.TOTAL)
*XDIM_MEMBERSET PRODUCT = BAS(ALL_PRODUCT)
*XDIM_MEMBERSET MEASURES = PERIODIC
*XDIM_MEMBERSET ACCOUNT = PL010
*XDIM_FILTER TIME = [TIME].Properties("FCST_SOURCE") = X

//*SELECT(%SOURCE%, [ID], TIME, [FCST_SOURCE] = "X")


*WHEN_REF_DATA = TRANS_DATA


*WHEN TIME.PERIOD
*IS JAN
*FOR %MONTH% = 01
*REC(EXPRESSION = %VALUE%, CATEGORY = FCST1, FORECAST = OFFSET12, TIME = "2012.%MONTH%")
*NEXT
*ENDWHEN

*WHEN TIME.PERIOD
*IS FEB
*FOR %MONTH% = 02
*REC(EXPRESSION = %VALUE%, CATEGORY = FCST1, FORECAST = OFFSET12, TIME = "2012.%MONTH%")
*NEXT
*ENDWHEN

*WHEN TIME.PERIOD
*IS MAR
*FOR %MONTH% = 03
*REC(EXPRESSION = %VALUE%, CATEGORY = FCST1, FORECAST = OFFSET12, TIME = "2012.%MONTH%")
*NEXT
*ENDWHEN

etc.. until monh 12.. :-/

regards

jorgen