ELPAR stands for Element Parent, which describes what it does pretty well! In other words it returns the parent of an element in a defined dimension. You are better to use a combination of attributes and ATTRS rather than this function. Please see our warning below.
Syntax
The syntax is:
ELPAR(dimension, element, index);
where:
- dimension is a valid dimension name, and
- element is the name of an element within the dimension or the name of an alias for an element in a dimension
- index is a positive number less than or equal to the total number of consolidated elements (parents) that use the element argument as a child. In other words, a positive number that is less than or equal to the number of direct parents that an element has.
Example of the use of ELPAR
ELPAR('Customer','Freds Corner Store',2);
In the dimension Customer, the element Freds Corner Store is a child of both Total Route and Sydney Region. Therefore, both Total Route and Sydney Region are parents of Freds Corner Store. In the structure of the Customer dimension, Total Route is defined first, Sydney Region is defined second.
The example returns Sydney Region, as this is the second instance of a parent to Freds Corner Store within the Customer dimension.
Warning
Be very careful on the use of ELPAR as if the index values change, then you will get different results. It might be better to define the parents into attributes that are refreshed when the dimension is updated and then use an ATTRS to display the relevant value.
Notes on ELPAR
ELPAR can be used in Rules, Processes and Excel worksheets.
Note this is not ELPARN! Please see this post for ELPARN.
Do You Need Help with Elements in Rules, TI’s or Excel Worksheets?
If you have any questions on how to manage elements with either TI processes or rules, please get in touch. We’d love to help.