The query below returns True for the member Bikes since it is an ancestor of Road-650 Black, 58. All other Category members are not ancestors for Road-650 Black, 58, therefore, the IsAncestor function returns False.
|
|
WITH MEMBER [Measures].[IsAnAncestor] AS ISANCESTOR([Product].[Product Categories].CurrentMember, [Product].[Product Categories].[Product].[Road-650 Black, 58])
SELECT {[Measures].[IsAnAncestor]} ON COLUMNS,
{[Product].[Product Categories].[Category]} ON ROWS
FROM [Adventure Works] |
|
|
|
|
|
|
The query below returns True for the member CY 2001 since it is an ancestor of September 2001. All other Calendar Years are not ancestors for September 2001, therefore, the IsAncestor function returns False.
|
|
WITH MEMBER [Measures].[TrueOrFalse] AS ISANCESTOR([Date].[Calendar].CurrentMember, [Date].[Calendar].[September 2001])
SELECT {[Measures].[TrueOrFalse]} ON COLUMNS,
{[Date].[Calendar].[Calendar Year].Members} ON ROWS
FROM [Adventure Works]
|
|
|
|
|
|
|