ELEMENTHASANCESTOR
Returns true (1) if the element from the specified dimension for the cell being evaluated is a descendant of the specified potential ancestor.
js
ELEMENTHASANCESTOR(dimension, ancestor)
ELEMENTHASANCESTOR(dimension, ancestor, hierarchy) // ^v3.3.7Parameters
dimension- The name of the dimension.ancestor- The name of the potential ancestor.hierarchy- The hierarchy to look for the ancestor in. If the ancestor isn't in this hierarchy, the result is 0.(optional)^v3.3.7
Examples
js
ELEMENTHASANCESTOR("Time", "2015")Note: If the user is refreshing a workview which is only looking at 2015 - Jan the result will be 1.
js
ELEMENTHASANCESTOR("Time", "2015", "Default (Calendar)")Note: The same check, but 2015 is only looked for in the Default (Calendar) hierarchy.