hierarchy.childCount
Returns the number of children of a parent element.
js
hierarchy.childCount(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 parent element's name. |
Returns
numberThe number of immediate children, or -1 when the dimension, hierarchy or element can't be found.
Examples
js
const childrenCount = hierarchy.childCount("Account", "Management Profit and Loss", "EBIT");