Skip to Content
Apr 24, 2014 at 08:27 PM

Simplify logic script


I want to update an existing package by adding a new section to take the actual dollars from a 12 month period and copy the total to the month and category selected when the package is run.

Right now I am scoping the time by listing each period like so:

*XDIM_MEMBERSET TIME = period1,period2,period3,...period12

Then I am basically repeating the same steps in the WHEN block:

*IS "period1","period2","period3",..."period12"

This works OK but requires someone to manually update the periods each time we run the package. What I would like to do is rewrite the logic so it does not require the manual update each time the package is run.

Is it possible to use a SELECT statement to determine my 12 month period? It would be the month selected when the package is run, plus the 11 months prior to that. For example, if the user selected MAR2014, it would be the 12 month period from APR2013 - MAR2014.

I imagine it would look something like below but for the SELECT statement but I don't know how to get the other 11 months.


Once I have the variable populated, would the syntax below work for the WHEN block?