DESCENDANTS
1. DESCENDANTS (Level Expression)
Description:
This function is used to return the set of descendants of a member at a specified level or distance, optionally including or excluding descendants in other levels.
Syntax:
Descendants((Member_Expression /Set_Expression) Expression [ , Level_Expression [ ,Desc_Flag ] ] )
Return Type:
SET
Parameters:
Parameter | Description |
|---|---|
Member_Expression | It is a valid MDX expression that returns a member. |
Set_Expression | It is a valid MDX expression that returns a set. |
Level_Expression | It is a valid MDX expression that returns a level. |
Desc_Flag | It is a valid string expression specifying a description flag that distinguishes among possible sets of descendants. |
Example:
SELECT
[Measures].[Internet Sales Amount] ON COLUMNS,
Descendants([Product].[Product Categories].[Category].&[Bikes], [Product].[Product Categories].[Product]) ON ROWS
FROM [AdventureWorksMF_ValueBased]2. DESCENDANTS (Distance)
Description:
This function is used to return the set of descendants of a member at a specified level or distance, optionally including or excluding descendants in other levels.
Syntax:
Descendants((Member_Expression/Set_Expression) Expression [ , Distance [ ,Desc_Flag ] ] )
Return Type:
SET
Parameters:
Parameter | Description |
|---|---|
Member_Expression | It is a valid MDX expression that returns a member. |
Set_Expression | It is a valid MDX expression that returns a set. |
Distance | It is a valid numeric expression that specifies the distance from the specified member. |
Desc_Flag | It is a valid string expression specifying a description flag that distinguishes among possible sets of descendants. |
Example:
SELECT
[Measures].[Internet Sales Amount] ON COLUMNS,
Descendants([Product].[Product Categories].[Category].&[Bikes], , SELF_AND_AFTER) ON ROWS
FROM [AdventureWorksMF_ValueBased]