ELCOMP TM1 Function: Syntax and Use

The ELCOMP function in TM1 is used to derive the element at a specific position as the child of a parent.

Syntax

The syntax is:

ELCOMP(DimName, Parent, Position)

where:

  • DimName is the dimension you are evaluating,
  • Parent is the parent element, and
  • Position is the number that correlates with the position you want to find the element ID for.

Example of ELCOMP

For example we have the following structure:

  • 2021
    • 2021 Period 1
      • Week 1 2021
      • Week 2 2021
      • Week 3 2021
      • Week 4 2021

When evaluating 2021 Period 1, the 4th element that is child to 2021 Period 1 is Week 4 2021.

This would be written in a rule as:

ELCOMP('Time', !Time, 4)

So when the rules hit 2021 Period 1, the fourth child of that element is 2021 Week 4.

In a Turbo Integrator Process

We have a great write up of the use of ELCOMP in a Turbo Integrator process in our post on using a TI to unwind a dimension. You’ll find it here.

Notes re ELCOMP

ELCOMP can be used in both Turbo Integrator processes and TM1 Rules.

See ELCOMPN to find the numeric position of an element beneath a parent.

See this post about how we can use a combination of ELCOMP and ELCOMPN to find the “as at” balances of elements, rather than just rolling them up. For example, with inventory balances.

ELCOMP can also be used in Planning Analytics for Excel reports. Please see this post for information on how you can use it in PAX.

You might also like