RelMemberRange
The MDX RelMemberRange function returns a set that is based on the relative position of the specified member in the Essbase outline. When multiple hierarchies are enabled, this function returns NULL when the range begins in one hierarchy and terminates in another hierarchy.
Syntax
RelMemberRange ( member, prevcount, nextcount, [,layertype] [, hierarchy ])
Parameters
- member
-
An input member in the set you want to return.
- prevcount
-
The number of members in the same layer specified by layertype prior to member to include in the return set.
- nextcount
-
The number of members in the same layer specified by layertype following member to include in the return set.
- layertype
-
GENERATION or LEVEL. If omitted, the default is GENERATION. Defines whether the set to be returned is based the same generation or on the same level as member.
- hierarchy
-
Optional. A specific hierarchy within the time dimension.
Example 1
SELECT
RelMemberRange ([PORTLAND - OR],1,2)
ON COLUMNS
FROM ASOSamp.Basic
The above MDX query returns the following set:
{[PHOENIX - OR],[PORTLAND - OR],[POWERS - OR],[PRAIRIE CITY - OR]}
Example 2
The following MDX expression:
RelMemberRange(Apr, 5, 0)
returns the set {Jan, Feb, Mar, Apr}
. Note that the output set has only four members.
The following MDX expression:
RelMemberRange(Apr, 5, 10)
returns the set {Jan, Feb, Mar, Apr, May ...,Dec}
. Note that the output set has only four previous members and seven next members of Apr.
See Also