Skip to content

hierarchy.childCount ​

Returns the number of children of a parent element.

js
hierarchy.childCount(dimension, hierarchy, element)

Parameters ​

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

Returns ​

number

The 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");