MembersAscendantsDescendants Function (SAP HANA Platform)
SAP HANA includes the MembersAscendantsDescendants function that enables you to get, for example, all ascendants and descendants of a specific member.
This function improves on the standard MDX functions Ascendants and Descendants.
The function can be called as follows:
MembersAscendantsDescendants (<set>, <flag>)
- <set>
- A set of members from a single hierarchy.
- <flag>
- Indicates which related members to return, and can be one of the following:
Example
SELECT
{ [Measures].[SALES] }
ON COLUMNS,
NON EMPTY
{ Hierarchize( MembersAscendantsDescendants([SALES_DATA_TIME].[TimeHier].[QUARTER].[3]:[SALES_DATA_TIME].[TimeHier].[QUARTER].[4], MEMBERS_AND_ASCENDANTS_AND_DESCENDANTS )) }
ON ROWS
FROM [SALES_DATA]
SELECT
{ [Measures].[SALES] }
ON COLUMNS,
NON EMPTY
{ Hierarchize( MembersAscendantsDescendants([SALES_DATA_TIME].[TimeHier].[QUARTER].[3]:[SALES_DATA_TIME].[TimeHier].[QUARTER].[4], ONLY_ASCENDANTS )) }
ON ROWS
FROM [SALES_DATA]