@SHIFTSIBLING

Returns the specified member or the nth sibling of the member. @SHIFTSIBLING traverses members that are at the same level and of the same parent. If the specified relative position moves beyond the first or last sibling, Essbase returns an empty string.

This function returns the next sibling as a string. To pass the @SHIFTSIBLING function as a parameter of another function, where the function requires a list of members, you must wrap the output of @SHIFTSIBLING with the @MEMBER function.

Syntax

@SHIFTSIBLING (mbrName [,relativePosition])
ParameterDescription

mbrName

Valid member name or member-name combination or a function that returns one member or member combination.

relativePosition

Optional. The integer that defines the position relative to the specified member. Valid values:

  • 0 (Default) Returns the specified member.

  • < 0 (negative integer): Returns the previous sibling.

  • > 0 (positive integer): Returns the next sibling.

Example

All examples are from the Sample.Basic database.

@SHIFTSIBLING(“100–20”,0)

Returns 100-20 (the specified member).

@SHIFTSIBLING(“200”,1)

Returns 300 (the next sibling of 200). The @SHIFTSIBLING(“200”,1) function and the @NEXTSIBLING(“200”) function return the same results.

Returns 400 (the second-next sibling of 200).

@SHIFTSIBLING(“100–20”,–1)

Returns 100-10 (the previous sibling of 100-20). The @SHIFTSIBLING(“100–20”,–1) function and the @PREVSIBLING(“100–20”) function return the same results.

@SHIFTSIBLING(“100–10”,9)

Returns an empty string, as 100-10 does not have a ninth sibling.

@CHILDREN(@MEMBER(@SHIFTSIBLING("East")))

Returns all children of East. Because no shift position is specified, the default shift position is 0, which means the current member.

See Also