Create offline cube files (.cub) with OlapCube. Download Now!


table of contents

Cousin

Returns the child member with the same relative position under a parent member as the specified child member.

Syntax

Cousin(«Member1», «Member2»)

Remarks

This function operates on the order and position of members within levels. If two dimensions exist, in which the first one has four levels and the second one has five levels, the cousin of the third level of the first dimension is the third level of the second dimension.

Example

The following example assumes that both years 1996 and 1994 contain the same number of months preceding the member March:

Cousin([1996].March, [1994])

This example yields the member [1994].March.

If the same example assumes that the 1996 level contains the January, February, March, April, May, June, July, August, September, October, November, and December members, and the 1994 level contains the [1st Quarter], [2nd Quarter], [3rd Quarter], and [4th Quarter] members, the example returns [1994].[3rd Quarter] because it is in the same relative position (third) within the level.