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:
  • MEMBERS_AND_ASCENDANTS_AND_DESCENDANTS
  • MEMBERS_AND_ASCENDANTS
  • MEMBERS_AND_DESCENDANTS
  • ASCENDANTS_AND_DESCENDANTS
  • ONLY_ASCENDANTS
  • ONLY_DESCENDANTS

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]