hierarchy.hasRootMember
Checks whether an element is a top-level element of a hierarchy.
js
hierarchy.hasRootMember(dimension, hierarchy, name)Parameters
| Parameter | Type | Description |
|---|---|---|
dimension | string | The dimension's name or id. |
hierarchy | string | The hierarchy's name or id. |
name | string | The element's name. |
Returns
booleantrue 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
}