Page 1 of 1

loading data into 12 months

Posted: Fri Jan 08, 2021 5:25 pm
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

Re: loading data into 12 months

Posted: Fri Jan 22, 2021 12:48 pm
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