Data Tab (TI)

Post Reply
TM1_1
Posts: 4
Joined: Tue Aug 15, 2017 2:34 am
OLAP Product: TM1
Version: 10.2
Excel Version: 2016

Data Tab (TI)

Post 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
BariAbdul
Regular Participant
Posts: 424
Joined: Sat Mar 10, 2012 1:03 pm
OLAP Product: IBM TM1, Planning Analytics, P
Version: PAW 2.0.8
Excel Version: 2019

Re: Data Tab (TI)

Post by BariAbdul »

The problem, I guess is here;
IF(vt_months@>vMonthActual);
Think ,what are you doing here.Thanks
"You Never Fail Until You Stop Trying......"
Drg
Regular Participant
Posts: 159
Joined: Fri Aug 12, 2016 10:02 am
OLAP Product: tm1
Version: 10.2.0 - 10.3.0
Excel Version: 2010

Re: Data Tab (TI)

Post by Drg »

ENJOY :)

Code: Select all

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