hierarchy.position
Returns the position of an element in a hierarchy.
js
hierarchy.position(dimension, hierarchy, element)Parameters
| Parameter | Type | Description |
|---|---|---|
dimension | string | The dimension's name or id. |
hierarchy | string | The hierarchy's name or id. |
element | string | The element's name. |
Returns
numberThe 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");