Skip to Content
author's profile photo Former Member
Former Member

Forecast Roll-Over Script across multiple years

Hello Experts,

I currently have the below Script and Prompt but it only works for one Fiscal year and I need help changing it so that it can be used across multiple years, my issue is below:

If I have project TEST and it started in 2013.011 and ends in 2014.004, I have forecast values for all periods so when I run the script I'm prompted to "select forecast year" and "select forecast version based on previous period"

So when I run from 2013.11 (forecast version P11) to 2013.12 (forecast version P12) that works fine but it's not working to roll-over from 2013.012 to 2014.001

Any help is much appreciated.

Thx,

Shane

*****SCRIPT*****

//%CATEGORY_SET% - contains P9, STARTMNTH = 10, PREVFC=P8

*SELECT(%SM%,"[STARTMNTH]",F_CATEGORY,"[ID]='%F_CATEGORY_SET%')

//$YY$ - contain planning year selected by user from DM combobox

*SELECT(%FCSTMNTH%,"[ID]",TIME,"[ID]>'$YY$.%SM%' AND [YEAR]='$YY$' AND [CALC]='N'")

*SELECT(%ACTMNTH%,"[ID]",TIME,"[ID]<'$YY$.%SM%' AND [YEAR]='$YY$' AND [CALC]='N'")

*SELECT(%PF%,"[PREVFCST]",F_CATEGORY,"[ID]='%F_CATEGORY_SET%')

//To copy FORECAST XX we use

*XDIM_MEMBERSET F_CATEGORY=%PF%

*XDIM_MEMBERSET TIME=$YY$.%SM%,%FCSTMNTH%

*WHEN F_CATEGORY

*IS *

*REC(EXPRESSION=%VALUE%,F_CATEGORY=%F_CATEGORY_SET%)

*ENDWHEN

//To copy ACTUAL we use

*XDIM_MEMBERSET F_CATEGORY=ACTUAL

*XDIM_MEMBERSET TIME=%ACTMNTH%

*WHEN F_CATEGORY

*IS *

*REC(EXPRESSION=%VALUE%,F_CATEGORY=%F_CATEGORY_SET%)

*ENDWHEN

*****PROMPT*****

PROMPT(MESSAGE,"Create Forecast Based on Previous")

PROMPT(COMBOBOX,%YY%,"Select Forecast Year:",0,,{2014,2015,2016,2017,2018})

PROMPT(SELECTINPUT,%SELECTION%,,"Select the Forecast Version:","F_CATEGORY")

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)

INFO(%EQU%,=)

INFO(%TAB%,;)

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,TAB,%TAB%)

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,EQU,%EQU%)

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SELECTION,%SELECTION%)

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,FORECAST.LGF)

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,REPLACEPARAM,YY%EQU%%YY%)

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Mar 11, 2014 at 07:40 AM

    Hi Shane,

    You have to somehow specify what do you mean by "can be used across multiple years"

    For how many years you are forecasting?

    For example, if instead of:

    *SELECT(%FCSTMNTH%,"[ID]",TIME,"[ID]>'$YY$.%SM%' AND [YEAR]='$YY$' AND [CALC]='N'")

    you will use:

    *SELECT(%FCSTMNTH%,"[ID]",TIME,"[ID]>'$YY$.%SM%' AND [CALC]='N'")

    then all months later then '$YY$.%SM% defined in the system will be selected.

    Vadim

    Add a comment
    10|10000 characters needed characters exceeded

    • "we want to have actual from prev years" All prev years???? Extremely strange requirement from business point of view... What for?

      I understand the idea to combine actuals and forecast for the current year to have correct year total, but the information about previous year actuals have to be taken from ACTUAL category in the reports!

      Vadim

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.