Page 1 of 1

Data Tab (TI)

Posted: Wed Aug 16, 2017 10:23 pm
by TM1_1
Hi,
I try to copy the data within the same cube. But the result is not exactely what im looking for
i would like to copy tha last actual month fto the upcoming months in the forecast scenario. The problem that my "if" statement doesn't work in the data tab. The result the data is copied for all months
here is my code.
[td]### Initialise Debug ###
If( pDebug >= 1 );
# Set debug file name
sDebugFile = cDebugFile | 'Data.debug';
# Log start time
IF (nHeader = 0);
AsciiOutput( sDebugFile, 'Process Started: ' | TimSt( Now, '\d-\m-\Y @\h:\i:\s' ) );
nHeader = 1;
ENDIF;
EndIf;

IF (pDebug = 2);
ItemSkip;
ENDIF;

vMonthActual=CellGetS('SYS_Time', 'Actuals', 'Month');

cPeriodAverage=CellGetN('Exchange_Rate',Currency,vMonthActual,CellGetS('SYS_Time', 'Actuals', 'Scenario'),'Period Average');


vt_months = t_months;

IF(vt_months@>vMonthActual);


CellPutN(cPeriodAverage, 'Exchange_Rate',Currency,t_months,cDestScenario,'Period Average');



ENDIF;
[/td]

Thanks

Re: Data Tab (TI)

Posted: Thu Aug 17, 2017 5:16 am
by BariAbdul
The problem, I guess is here;
IF(vt_months@>vMonthActual);
Think ,what are you doing here.Thanks

Re: Data Tab (TI)

Posted: Fri Aug 18, 2017 9:18 am
by Drg
ENJOY :)

Code: Select all

IF(NUMBR(vt_months)>NUMBR(vMonthActual));