Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 10116

Re: Invalid TMVL Return Value - How can I achieve this

$
0
0

Hi All,

 

I achieved this by following way.

 

Created a property at TIME dimension and define the value as Y for current period. (This helps to avoid TMVL works for forecast periods because the issue before is its validating with all periods which are all available in TIME dimension. So when it process with 2017.01 it searches for 2019.01 which is not available in TIME dimension)

 

Following is the script logic for my requirement.

 

*SELECT (%LAST%,[ID],TIME,"[CURR_PERIOD]='Y'")

*SELECT (%VALID%,[ID],TIME,"[ID]<=%LAST%")

*XDIM_MEMBERSET TIME AS %F% = BAS(%VALID%)

*FOR %F% = %F%

*WHEN TIME.YEAR

*IS 1

*REC(FACTOR=10,TIME = TMVL(12, %F%))

*IS 2

*REC(FACTOR=10,TIME = TMVL(24, %F%))

*IS 3

*REC(FACTOR=10,TIME = TMVL(36, %F%))

*ENDWHEN

*NEXT

 

I hope it will help others in future.

 

Thanks,

Suresh


Viewing all articles
Browse latest Browse all 10116

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>