Skip to content

hierarchy.elementHasAncestor

js
hierarchy.elementHasAncestor(dimensionName, hierarchyName, elementName, ancestorName)

Parameters

  • dimensionName - The dimension.
  • hierarchyName - Name of Hierarchy.
  • elementName - Child element to be tested.
  • ancestorName - The ancestor element name

TIP

You can prefix with the hierarchy using ancestorName.

Example

js
let value = hierarchy.elementHasAncestor("Time", "Default (Calendar)", "August", "2015");