ELPAR TM1 Function: Syntax and Use

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.

Example of the use of ELPAR

ELPAR(“Customer”,”Fred’s Corner Store”,2)

In the dimension Customer, the element Fred’s Corner Store is a child of both Total Route and Sydney Region. Therefore, both Total Route and Sydney Region are parents of Fred’s 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 Fred’s 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.

This is a TM1 worksheet function, valid only in worksheets.

If you like this post, please spread the love…

About John

Managing Director of Infocube. We are a management accounting consultancy that specialises in Business Analytics.

This site uses Akismet to reduce spam. Learn how your comment data is processed.