Skip to content

hierarchy.position ​

Returns the position of an element in a hierarchy.

js
hierarchy.position(dimension, hierarchy, element)

Parameters ​

ParameterTypeDescription
dimensionstringThe dimension's name or id.
hierarchystringThe hierarchy's name or id.
elementstringThe element's name.

Returns ​

number

The element's position, starting at 0, or -1 when it can't be found.

Examples ​

js
const position = hierarchy.position("Account", "Management Profit and Loss", "EBIT");