Returns true if 'ancestor' member parameter is an ancestor of the 'member' parameter.
In our example, returns true as [Europe] is an ancestor of Paris.
Query
WITH
MEMBER [Measures].[IS_ANCESTOR] AS isAncestor([Geography].[Geo].[Europe],[Geography].[Geo].[Paris])
SELECT
[Measures].[IS_ANCESTOR] ON 0
FROM
[Sales]
Result
Assertion : MDX Equals
WITH
MEMBER [Measures].[IS_ANCESTOR] AS true
SELECT
[Measures].[IS_ANCESTOR] ON 0
FROM
[Sales]
Assertion : MDX Equals
// fine also for parents
WITH
MEMBER [Measures].[IS_ANCESTOR] AS isAncestor([Geography].[Geo].[France],[Geography].[Geo].[Paris])
SELECT
[Measures].[IS_ANCESTOR] ON 0
FROM
[Sales]
Returns false as a member is not an ancestor of itself.
Query
WITH
MEMBER [Measures].[IS_ANCESTOR] AS isAncestor([Geography].[Geo].[Paris],[Geography].[Geo].[Paris])
SELECT
[Measures].[IS_ANCESTOR] ON 0
FROM
[Sales]
Result
Assertion : MDX Equals
WITH
MEMBER [Measures].[IS_ANCESTOR] AS false
SELECT
[Measures].[IS_ANCESTOR] ON 0
FROM
[Sales]
Returns false if applied to members from different hierarchies or dimensions.
Query
WITH
MEMBER [Measures].[IS_ANCESTOR] AS isAncestor( [Geography].[Economy].[United States], [Geography].[Geo].[New York])
SELECT
[Measures].[IS_ANCESTOR] ON 0
FROM
[Sales]
Result
Assertion : MDX Equals
WITH
MEMBER [Measures].[IS_ANCESTOR] AS false
SELECT
[Measures].[IS_ANCESTOR] ON 0
FROM
[Sales]
Assertion : MDX Equals
WITH
MEMBER [Measures].[IS_ANCESTOR] AS isAncestor([Prod].[icCube],[Geography].[Geo].[Paris])
SELECT
[Measures].[IS_ANCESTOR] ON 0
FROM
[Sales]