loading data into 12 months

Post Reply
samiamsz
Posts: 16
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 » Fri Jan 08, 2021 5:25 pm

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

Post Reply