Returns a child member at the same position as a member from another ancestor.
Syntax
Cousin ( member1, member2 )
| Parameter | Description |
|---|---|
A child member. For example, [Year].[Qtr1]. | |
An ancestor for which Cousin() should the return child member at the same position as member1. |
Notes
Assuming a symmetric hierarchy, Cousin takes as input one member (member1) from one hierarchy and an ancestor member (member2) of another hierarchy, and returns the child of member2 that is at the same position as member1.
Example
This example uses the following parts of the Sample Basic outline:

The following expression
{ Cousin ( [Qtr2].[Apr], [Qtr4] ) }returns the member:
[Qtr4].[Oct]
And the following expression
[Product].generations(2).members
returns the set:
{ [100], [200], [300], [400], [Diet] }Therefore, the following query
SELECT
{ Cousin ( [Qtr2].[Apr], [Qtr4] ) }
ON COLUMNS,
[Product].generations(2).members
ON ROWS
FROM Sample.Basicreturns the grid:
| (axis) | Oct |
|---|---|
| 100 | 2317 |
| 200 | 2505 |
| 300 | 2041 |
| 400 | 1790 |
| Diet | 2379 |