The CMEMBERPARENT formula is an enhanced member function that provides the ability to return the parent of a given member within a hierarchy.
CMEMBERPARENT (Datasource, Catalog, Cube, MemberUniqueId, Index, ReturnProperty)
Specify the Analysis Services server that you want to connect to.
Specify the catalog of cubes on the datasource that you want to perform your query on.
Specify the cube that you want to perform your query on.
Member Unique ID¶
Specify the Unique ID of the member which you want to retrieve information about.
Specify the ordinal (index) position which you want to retrieve information about.
Specify either the intrinsic member property (mdx) or the member attribute that you want to display in the cell. Member attributes should be in the form “[Dimension].[Hierarchy].[Attribute Name]”
Default value: MEMBER_CAPTION
This function provides the ability to return the parent of a given member within a hierarchy.
Input of value of Datasource, Catalog, Cube, and Member Unique ID are compulsory, while other arguments are optional.
The parent of January 2006 (member_unique_id of which is held in cell C5) is Q1 CY 2006 (which is shown in cell C6). The formula used to determine this is shown in cell C7.
We can use the Intrinsic Properties as well. Using the Intrinsic Property “Parent_Unique_Name” against the CMEMBERPARENT formula will return the GrandParent of a member. Cell C6 shows the GrandParent of cell C5, since it is using the CMEMBERPARENT CALUMO function, together with the Intrinsic Property Parent_Unique_Name.