Skip to content

hierarchy.hasRootMember ​

Checks whether an element is a top-level element of a hierarchy.

js
hierarchy.hasRootMember(dimension, hierarchy, name)

Parameters ​

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

Returns ​

boolean

true when the element is at the top level of the hierarchy, otherwise false.

Examples ​

js
if (hierarchy.hasRootMember("Account", "Profit and Loss", "EBITDA")) {
    // do something
}