IsAncestor
The MDX IsAncestor function for Essbase returns TRUE if the first member is an ancestor of the second member and, optionally, if the first member is equal to the second member.
Syntax
IsAncestor ( member1 , member2 [, INCLUDEMEMBER])
Parameters
Example 1
The following query returns all Market dimension members for which the expression IsAncestor([Market].CurrentMember, [Florida])
returns TRUE; in other words, the query returns all ancestors of Florida:
SELECT
Filter([Market].Members, IsAncestor([Market].CurrentMember, [Florida]))
ON COLUMNS
FROM Sample.Basic
The above query returns the following output:
Table 4-88 Output Grid from MDX Example
Market | East |
---|---|
105522 | 24161 |
Example 2
The following query is the same as the above query, except that it uses INCLUDEMEMBER. It returns all Market dimension members for which the expression IsAncestor([Market].CurrentMember, [Florida], INCLUDEMEMBER))
returns TRUE; in other words, the query returns Florida and all ancestors of Florida:
SELECT
Filter([Market].Members, IsAncestor([Market].CurrentMember, [Florida], INCLUDEMEMBER))
ON COLUMNS
FROM Sample.Basic
The above query returns the following output:
Table 4-89 Output Grid from MDX Example
Market | East | Florida |
---|---|---|
105522 | 24161 | 5029 |