ELISANC is one of the more versatile functions in Planning Analytics. The function determines whether the first element is an ancestor of the second element. This function returns 1 if the relationship is true, and it returns 0 if the relationship is not true. Although ELISANC can be used in rules and TurboIntegrator (TI), we will focus on using the function in TurboIntegrator in this article.

Syntax

ELISANC(dimension, element1, element2)

 

 

 

 

 

 

 

 

 

Example 1

ELISANC (‘Period’, ‘Q1 2020’, ‘202001’)

The element named Q1 2020 is an ancestor of the element named 202001. Therefore, this statement returns 1.

Example 2

ELISANC (‘Period’, ‘2020’, ‘202001’)

The element named 2020 is an ancestor of the element named 202001. This statement returns 1.

Example 3

ELISANC (‘Period’, ‘Q1 2020’, ‘202004’)

The element named Q1 2020 is not an ancestor of the element named 202004. Consequently, this statement returns 0.

Example 3

ELISANC (‘Period’, ‘202001’, ‘Q1 2020’)

The element named 202001 is not an ancestor of the element named Q1 2020. This statement returns 0.

We have discussed how the ELISANC function works. It is time to use it in a Turbo Integrator process. We use the ELISANC function when we want to find elements which are children or descendants of another element. The ELISANC function alone may not be useful, but the function will be very useful when we pair it with an IF condition. For example, we want to import from a file which contains 2019 and 2020 data, but we only want to load Q1 2020.  In the example below we will insert syntax on the Turbo Integrator (TI) DATA tab to read and load Q1 2020 data from the flat file to the Product Sales cube.   The process will evaluate each record in the data source, determine if the period meets the criteria, and load each record where the result is TRUE or “1”.

In our example, we prefixed our variable names with “c”.  The Entity Name column is not used.

 

 

 

 

 

 

 

Sample Code

IF ( ELISANC ( ‘Period’ , ‘Q1 2020’ , cPeriod ) = 1 ) ;

CELLPUTN ( cValue, ‘Product Sales’, cVersion, cEntityCode, cProduct, cPeriod, cMeasure ) ;

ENDIF ;

The test results can be found in the GIF image below.

 

 

 

 

 

 

 

 

 

 

Testing the sample code (GIF)