Data Tab (TI)
Posted: Wed Aug 16, 2017 10:23 pm
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
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