Skip to Content
author's profile photo Former Member
Former Member

Script logic Question

Hi exprets ,

I have an AST member that should be repeated over time

I did it with this script the KPI is an inputed value.

*SELECT(%LASTTID%,[TIMEID],TEMPS,ID=%TEMPS_SET%) //get TIMEID of last upload

*SELECT(%Y%,[YEAR],TEMPS,ID=%TEMPS_SET%) //get Year of last upload

*SELECT(%TARGET%,[ID],TEMPS,TIMEID>%LASTTID% AND YEAR=%Y% AND CALC=N)

//%TARGET% will contain remaining periods

*XDIM_MEMBERSET TEMPS=%TEMPS_SET%

*WHEN TV_COUTS_CHARGES.ACCTYPE

*IS AST

*FOR %T%=%TARGET%

*REC(EXPRESSION=%VALUE%,TEMPS=%T%)

*NEXT

*ENDWHEN

*COMMIT

and then this value should be send to another cube with destination app, the problem here is that the value that is send is just the I wrote in a the specific month not for all months .

here is the script of destination app

*DESTINATION_APP = Ressources_humaines

*SKIP_DIM =Nature

*SKIP_DIM =Famille

*RENAME_DIM TV_COUTS_CHARGES=TV_KPI_RH

*WHEN TV_COUTS_CHARGES

*IS CA002

*REC(FACTOR=1 , TV_COUTS_CHARGES = KPIRH003)

*ENDWHEN

*COMMIT

the problem here is the repeated values aren't sent to the desnation cube . how could I resolve that .

thank you .

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jul 28, 2016 at 02:11 PM

    You have to replicate code from the first script:

    *SELECT(%LASTTID%,[TIMEID],TEMPS,ID=%TEMPS_SET%) //get TIMEID of last upload

    *SELECT(%Y%,[YEAR],TEMPS,ID=%TEMPS_SET%) //get Year of last upload

    *SELECT(%TARGET%,[ID],TEMPS,TIMEID>%LASTTID% AND YEAR=%Y% AND CALC=N)

    *XDIM_MEMBERSET TEMPS=%TEMPS_SET%

    *WHEN TV_COUTS_CHARGES.ACCTYPE

    *IS AST

    *FOR %T%=%TARGET%

    *REC(EXPRESSION=%VALUE%,TEMPS=%T%)

    *NEXT

    *ENDWHEN

    *DESTINATION_APP = Ressources_humaines

    *SKIP_DIM =Nature

    *SKIP_DIM =Famille

    *RENAME_DIM TV_COUTS_CHARGES=TV_KPI_RH

    *WHEN TV_COUTS_CHARGES

    *IS CA002

    *FOR %T1%=%TARGET%

    *REC(EXPRESSION=%VALUE%,TEMPS=%T1%,TV_COUTS_CHARGES = KPIRH003)

    *NEXT

    *ENDWHEN

    Vadim

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.