loading data into 12 months

Post Reply
samiamsz
Posts: 18
Joined: Wed Sep 02, 2020 3:08 pm
OLAP Product: tm1
Version: 11.3. 0.
Excel Version: 16

loading data into 12 months

Post by samiamsz »

So I am writting a TI process for my finance cube.
it is pulling the acqusition or dispostion month from another cube.
IF the date is within the last 365 days. meaning the acqusition date for company x is april 2020, then I want data to be loaded into the Acqusition book from april 2020 - april 2021.

Code: Select all

 sAcqPeriod = CELLGETS(CubAcq, strScenario, sCompany, '1010 - 1', 'Acquisition_Period');
   IF(sAcqPeriod @<> '');
       nAcqMonthValue = ATTRN('Period', sAcqPeriod, 'MonthValue');
       nDiff = nCurrMonthValue - nAcqMonthValue;
       IF(nDiff < 365);
           IF (sAcqDept @='');
               strBook = strBook_Acq;
           ELSE;
               IF( sDept @= sAcqDept);
                    strBook = strBook_Acq;
               ENDIF;
           ENDIF;
im thinking i need another variable in my if statement for example
sYear = nAcqMonthValue (and somehow get the next 12 months)
and in my cellputN i use "sYear" for my period

or would i be using a while loop to get the next 12 months?

sorry for asking a simple question, im pretty new to coding and even newer to tm1
HighKeys
Posts: 117
Joined: Fri Aug 09, 2019 10:11 am
OLAP Product: TM1 / TM1 Web / Perspectives
Version: Planning Analytics V2.0.9
Excel Version: Office 365

Re: loading data into 12 months

Post by HighKeys »

Hi Samiasz!

you should post how your time dimension is structured in both cubes.

TM1 has time and date functions in TI.

https://www.ibm.com/support/knowledgece ... tions.html

BR
Post Reply