Siblings
The MDX Siblings function for Essbase returns the siblings of the input member, optionally based on selection options.
Syntax
Siblings ( member[, selection [,include_or_exclude]] )
member.Siblings
Parameters
- 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
-
If the input member is the top level of the dimension, this function returns a set containing the input member.
-
In aggregate storage databases, in multiple-hierarchy-enabled dimensions, if the input member is a top-level member of a hierarchy, the output is members across hierarchies that are top-level members of hierarchies.
-
This function is the same as
Children(member.parent)
. -
The member. Siblings syntax returns the same set as Siblings(member), Siblings(member, ALL), or Siblings(member, ALL, INCLUDEMEMBER).
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:
Table 4-125 Output Grid from MDX Example
Old Fashioned | Diet Root Beer | Sarsaparilla | Birch Beer | Root Beer | Cream Soda | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Budget | Variance | Budget | Variance | Budget | Variance | Budget | Variance | Budget | Variance | Budget | Variance |
11640 | -4439 | 14730 | -2705 | 5050 | -414 | 4530 | -438 | 35950 | -7996 | 29360 | -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]}
.