CMEMBERPARENT

The CMEMBERPARENT formula is an enhanced member function that provides the ability to return the parent of a given member within a hierarchy.

Syntax

CMEMBERPARENT (Datasource, Catalog, Cube, MemberUniqueId, Index, ReturnProperty)

Arguments

Datasource

(Required)

Specify the Analysis Services server that you want to connect to.

Catalog

(Required)

Specify the catalog of cubes on the datasource that you want to perform your query on.

Cube

(Required)

Specify the cube that you want to perform your query on.

Member Unique ID

(Required)

Specify the Unique ID of the member which you want to retrieve information about.

Index

(Required)

Specify the ordinal (index) position which you want to retrieve information about.

Return Property

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

Usage Scenarios

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.

Examples

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.