on 05-30-2017 7:29 AM
Hi everybody,
I'm new to BPC and I'm trying some Script Logic.
I'm trying to write an allocation which will work only for the Quarter selected.
For example, if I pick 2017.01, it will work only for 2017.01,2017.02,2017.03. If I pick 2017.04, it will work only the Q2 etc ... In the script below, whatever the Time member I pick, the allocation is done with all the months.
For so, I created a Time property "NUMQ" to define Q1, Q2 etc ...
Below the script
*SELECT (%GETYR%,"[YEAR]", TIME, "[ID]='%TIME_SET%'")
*SELECT (%GETQ%,"[NUMQ]", TIME, "[ID]='%TIME_SET%'")
*XDIM_MEMBERSET TIME = BAS(%GETYR%.%GETQ%)
*FOR %LOOPQ1% = %GETYR%.01 , %GETYR%.02 , %GETYR%.03
*RUNALLOCATION *FACTOR = USING / TOTAL
*DIM ACCOUNT WHAT=ALLOCPL ;WHERE=[ACCTYPE]="EXP"; Using=<<<
*DIM TIME WHAT= %LOOPQ1% ;WHERE=<<<; Using=<<<
*DIM CATEGORY WHAT=Budget ;WHERE=<<<; Using=Actual
*ENDALLOCATION
*NEXT
*FOR %LOOPQ2% = %GETYR%.04 , %GETYR%.05 , %GETYR%.06
*RUNALLOCATION *FACTOR = USING / TOTAL
*DIM ACCOUNT WHAT=ALLOCPL ;WHERE=[ACCTYPE]="EXP"; Using=<<<
*DIM TIME WHAT= %LOOPQ2% ;WHERE=<<<; Using=<<<
*DIM CATEGORY WHAT=Budget ;WHERE=<<<; Using=Actual
*ENDALLOCATION
*NEXT
Thanks for your help!
Thank you! I found the issue, I had another "glitch" in my scripts
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, but I do not understand the required calculation logic for TIME. Please provide data sample!
Anyway, please remember that after:
*ENDALLOCATION
script scope is reset to initial!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
13 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.