cancel
Showing results for 
Search instead for 
Did you mean: 

Time-Shift PRIOR Problem

Former Member
0 Kudos

Hi Guys,

I am in BPC 10 MS and i am trying to copy from previous month to the month selected by the user. I am using PRIOR function, but it is getting the wrong timeid.

*XDIM_MEMBERSET TEMPO = PRIOR(1, %TEMPO_SET%)

....

*REC(EXPRESSION=  %VALUE% , TEMPO = NEXT(1,%TEMPO_SET%)  )

I ran the package with 2013.JAN but the script is running with timeid 20201100, the expected was 20121200.

-> 2020 is the last year in my time dimension.

I add the property PRIOR, NEXT and CURRENT in time dimension.   Follows the record for 2013.JAN

IDTIMEIDPRIORCURRENTNEXT
2013.JAN201301002012.DEC2013.JAN2013.FEB

Could you help me in this issue? 

Thanks in advance.

Mauro

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186498
Active Contributor
0 Kudos

Hi Mauro,

can you please share the entire script?

Thanks

     Roberto

Former Member
0 Kudos

Hi Roberto,

follows the script. I don't know if the statement PRIOR(12, %TEMPO_SET%) is possible. I want to copy the records from last year to current year. I could change to *XDIM_MEMBERSET TEMPO = %TEMPO_SET%, but i  want that user select the current month/year.

*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%

*XDIM_MEMBERSET ENTITY = %ENTITY_SET%

*XDIM_MEMBERSET TEMPO = PRIOR(12, %TEMPO_SET%)

 

*WHEN TEMPO

*IS *

*REC(EXPRESSION=  %VALUE% , TEMPO = NEXT(12)  )

*ENDWHEN

  

Tks,

 

Mauro

former_member186498
Active Contributor
0 Kudos

Hi Mauro,

not sure but I don't think this is the correct syntax, try

*XDIM_MEMBERSET TEMPO = PRIOR(12)

*WHEN TEMPO

*IS PRIOR(12)

     *REC(EXPRESSION=%VALUE% , TEMPO=NEXT(12))

*ENDWHEN

Kind regards

     Roberto

former_member210696
Active Contributor
0 Kudos

Hi Mauro,

Can you please try below code once -

*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%

*XDIM_MEMBERSET ENTITY = %ENTITY_SET%

*XDIM_MEMBERSET TEMPO = PRIOR(12),%TEMPO_SET%

 

*WHEN TEMPO

*IS * PRIOR(12)

*REC(EXPRESSION=  %VALUE% , TEMPO = %TEMPO_SET% )

*ENDWHEN

If you pass 2013.JAN, it should copy data of 2012.JAN onto 2013.JAN.

Regards,

Ashish

Former Member
0 Kudos

Hi Ashish,

i tryed this but in this case PRIOR(12) works only for the first record.

I will change and ask for the user enter the previous month. It is a work around.

Tks guys.

former_member210696
Active Contributor
0 Kudos

Hi Maura,

Can you elaborate giving an example, would like to understand what is missing in the script?