on 07-06-2015 10:39 PM
Hi Friends,
The script below should not work for January Month and should work for rest of the Months for all Years. Could you pls. help how can I achieve this.
When i run the Data Package for January, this piece of logic should not work and should work for rest of the Months.
// POST NET PERIODIC VALUE
*XDIM_MEMBERSET TIME=$TIM$
*XDIM_MEMBERSET LOCATION=BAS(%LOCATION_SET%)
*XDIM_MEMBERSET KIT=BAS(ALL_KIT)
*XDIM_MEMBERSET KEYFIGURE=REVAL,PPV,UY,FOREX
*XDIM_MEMBERSET VERSION=ACTUAL
*XDIM_MEMBERSET DATASRC=YTDVAR
*WHEN TIME
*IS *
*REC(EXPRESSION=%VALUE%,DATASRC=PERIODVAR)
*ENDWHEN
*COMMIT
Thanks in advance,
Regards,
Venkat
Hello Venkat,
You can update your script as below (changes in bold)-
*WHEN TIME.MONTHNUM
*IS <> 1
*REC(EXPRESSION=%VALUE%,DATASRC=PERIODVAR)
*ENDWHEN
Alternatively, you could also write the script as -
*WHEN TIME.PERIOD
*IS <> JAN
*REC(EXPRESSION=%VALUE%,DATASRC=PERIODVAR)
*ENDWHEN
The *When statements in the above 2 examples will ensure that *rec is executed only when month is not equal to January.
Regards,
Shelly Jain
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I think using Vadim's select statement is better for performance. The reason is that when you use the select statement you remove Jan at the beginning so you won't have to perform the test condition for each period.
In other words, you save time by performing one filtering action (the select statement) instead of executing the condition in WHEN statement many times (once for each period within the scope).
*WHEN TIME.PERIOD
*IS <> JAN
Regards,
Leila
Thanks a lot Shelly, Vadim and Hendye..Worked perfect..
Regards,
Venkat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check your time dimension properties such as LEVEL/MONTHNUM etc
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Some extra variant
*SELECT(%T%,[ID],TIME,[ID]=$TIM$ AND [PERIOD]<>JAN)
*XDIM_MEMBERSET TIME=%T%
...
Vadim
And never use COMMIT with WHEN/ENDWHEN loop - absolutely useless.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
15 | |
4 | |
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.