Cousin (PQL)

Returns a member in the same relative position as the specified member, under the provided parent member in a 'regular' hierarchy.

Syntax

Cousin( <Member> , <Member> )

* Click on the function's arguments above for more details on the input values.

Comments
  • The first member needs to be the unique name of an existing member in a regular hierarchy. It represents the child element that will be matched in the parent's hierarchy.
  • The second member needs to be the unique name of an existing parent member in a regular hierarchy.
  • The function will not work on drill-path hierarchies.
  • For details on how to employ and use this function see the semantic calculation overview.
Different Function types
  • This function is like the MDX cousin function.

Examples

This example returns the child member "Alabama", since it is the first state under the parent "USA", like its cousin "Alberta" is the first state under its parent "Canada".

Cousin([Customer].^[Geo Location].[Canada].[Alberta], [Customer].^[Geo Location].[USA])