on 01-24-2015 9:28 AM
Hi ,
I have come across a scenario to loop on months of an year selected dynamically from the property.
suppose the plan year = 2015 for a business and I want to loop on 12 months of this plan year to add the calculated and adjustment data into another VERSION like this .
*XDIM_MEMBERSET TIME AS %PLAN_MONTH% = BAS(2015.TOTAL)
*XDIM_MEMBERSET VERSION = PLAN
*WHEN AUDITTRAIL
*IS CALC , ADJ
*FOR %TIME_MEM% = %PLAN_MONTH%
*WHEN TIME
*IS %TIME_MEM%
*REC(FACTOR = 1 , VERSION = FORECAST , AUDITTRAIL = CALC )
*ENDWHEN
*NEXT
ABOVE CODE WORKS FINE. IT ADDS DATA FROM TWO AUDIT TRAILS AND POSTS IT TO ANOTHER VERSION, AND IN CALC AUDITTRAIL.
ABOVE is the code when I am hardcoding the Year as 2015. Now I am reading year from property as :
*SELECT ( %PLANYEAR% , [PLAN_YEAR] , VERSION , ID = AOP)
*XDIM_MEMBERSET TIME AS %PLAN_MONTH% = BAS(%PLANYEAR%.TOTAL) // this line is showing me the error
*XDIM_MEMBERSET VERSION = PLAN
*WHEN AUDITTRAIL
*IS CALC , ADJ
*FOR %TIME_MEM% = %PLAN_MONTH%
*WHEN TIME
*IS %TIME_MEM%
*REC(FACTOR = 1 , VERSION = FORECAST , AUDITTRAIL = CALC )
*ENDWHEN
*NEXT
So I want to get the plan year months to loop on it. Please suggest how can I do it.
Thanks,
SHUBHAM
Hi Shubham,
Can you try this
*XDIM_MEMBERSET TIME AS %PLAN_MONTH% = %PLANYEAR%.01,%PLANYEAR%.02,%PLANYEAR%.03,...,%PLANYEAR%.12
P.S. not tested ...
Shrikant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Shubham,
On which Dimension you are applying SELECT function and what is "AOP" in select function.
Can you try below script:
*SELECT (%PLANYEAR%,"[PLAN_YEAR]",VERSION,"[ID]" = AOP)
*XDIM_MEMBERSET TIME = BAS(%PLANYEAR%.TOTAL)
*XDIM_MEMBERSET VERSION = PLAN
*WHEN AUDITTRAIL
*IS CALC , ADJ
*FOR %TIME_MEM% = BAS(%PLANYEAR%.TOTAL)
*WHEN TIME
*IS*
*REC(FACTOR = 1 , VERSION = FORECAST , AUDITTRAIL = CALC )
*ENDWHEN
*NEXT
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
Thanks for Response. AOP is a dimension member against which 2015 value is maintained in the PLAN_YEAR property in VERSION dimension.
@Shrikant ,Bhagyesh :
The following statement is giving syntax error in script logic. I had tried this out earlier also.
*XDIM_MEMBERSET TIME = BAS(%PLANYEAR%.TOTAL)
error says : No members found in dimension time for " CALC = N"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.