FirstSibling

The MDX FirstSibling function for Essbase returns the first child of the input member's parent.

Syntax

FirstSibling ( member [, hierarchy ])
member.FirstSibling [(hierarchy)]

Parameters

member

A member specification.

hierarchy

Optional. A specific hierarchy within the time dimension.

Notes

If member is the top member of a dimension, then member itself is returned.

Example

Example 1

Year.Firstsibling returns Year.

Qtr3.firstsibling returns Qtr1.

Example 2

For every month, the following query displays the change in inventory level since the beginning of the quarter.

WITH MEMBER
 [Measures].[Inventory Level since beginning of Quarter]
AS 
 '[Ending Inventory] - ([Opening Inventory], [Year].CurrentMember.FirstSibling)'
SELECT
 {[Measures].[Inventory Level since beginning of Quarter]} 
ON COLUMNS,
 Year.Levels(0).Members ON ROWS
FROM Sample.Basic

This query returns the grid:

Table 4-72 Output Grid from MDX Example

(axis) Inventory Level Since Beginning of Quarter
Jan -971
Feb -1847
Mar 1738
Apr 6740
May 17002
Jun 24315
Jul -871
Aug -1243
Sep -1608
Oct 2000
Nov 5308
Dec 4474