The ELLEV function returns the numeric value of the level for an element in a dimension in TM1.
The syntax is ELLEV(dimension, element); where:
dimension, is the dimension you are interrogating, and
element, is the element you want the level number for
Use of ELLEV
This function is used to determine the level of a specific element in a dimension. It is often used in conjunction with an IF statement to then do something based on the result.
For example, if I want to test to see if an element is an N level element you would nest an ELLEV into an IF statement like the following. Then based on the outcome of the IF statement, I could populate a variable (in this case called sParent) for subsequent use in creating or updating a heirachy in a Turbo Integrator process.
IF ( ELLEV (‘Products’, vProduct) =0);
sParent = ATTRS (‘Products’, vProduct, ‘BossProduct’);
This function is valid in both Rules and Turbo Integrator processes