Siblings

Returns the siblings of the input member, optionally based on selection options.

Syntax

Siblings ( member[, selection [,include_or_exclude]] )
member.Siblings
ParameterDescription

member

The member for which siblings are returned.

selection

Optional. This option can be one of the following:

  • LEFT—Selects the siblings to the left of the input member

  • RIGHT—Selects the siblings to the right of the input member

  • ALL—Selects all the siblings of the input member

If no selection is made, the default is ALL.

include_or_exclude

Optional. This option can be one of the following:

  • INCLUDEMEMBER—Includes the input member in the siblings list

  • EXCLUDEMEMBER—Excludes the input member from the siblings list

If neither is specified, the default is to include the input member.

Notes

Example

Example 1

Siblings(Year) returns {Year}.

The following query

SELECT
CrossJoin (
         Union (
            Siblings ([Old Fashioned]),
            {([Root Beer]), ([Cream Soda])}
         ),
         {(Budget), ([Variance])}
      )
ON COLUMNS
from Sample.Basic

returns the grid:

Old FashionedDiet Root BeerSarsaparillaBirch BeerRoot BeerCream Soda
BudgetVarianceBudgetVarianceBudgetVarianceBudgetVarianceBudgetVarianceBudgetVariance
11640-443914730-27055050-4144530-43835950-799629360-3561

Example 2

The following examples are based on a Years – Quarters – Months Time hierarchy.

Siblings([Feb 2000], LEFT, INCLUDEMEMBER)

Returns {[Jan 2000], [Feb 2000]}.

Siblings([Feb 2000], RIGHT, EXCLUDEMEMBER)

Returns {[Mar 2000]}.

Siblings([Mar 2000], LEFT)

Returns {[Jan 2000], [Feb 2000], [Mar 2000]}.

Siblings([May 2000], RIGHT)

Returns {[May 2000], [Jun 2000]}.

Siblings([Mar 2000])

OR

[Mar 2000].Siblings

Returns {[Jan 2000], [Feb 2000], [Mar 2000]}.