@RELATIVE
The @RELATIVE calculation function returns all members at the specified generation or level, relative to the specified member in the Essbase database outline.
Syntax
@RELATIVE (mbrName, genLevNum | genLevName)
Parameters
- mbrName
-
Any valid single member name, or a function that returns a single member.
- genLevNum
-
An integer value that defines the number of a generation or level. A positive integer defines a generation number. A value of 0 or a negative integer defines a level number.
- genLevName
-
Generation or level name specification.
Notes
Essbase sorts the generated list of members in ascending order. Using Sample Basic as an example, @RELATIVE(200,0)
, returns 200-10, 200-20, 200-30, 200-40 (in that order). This order is important to consider when you use this function with certain forecasting and statistical functions.
If the specified parameters to @RELATIVE are used with the specified level or generation describing the specified member, then the specified member is included. For example, @RELATIVE(("100-10",0))
includes 100-10 in the results, because 100-10 is a level 0 member. @RELATIVE(("100",1))
includes 100 in the results, because 100 is a level 1 member.
Example
In the Sample Basic cube, both of the following function calls return Jan, Feb, and Mar (in that order):
@RELATIVE(Qtr1,3)
@RELATIVE(Qtr1,0)
The following example returns the two members that are at level 1 and that are below Profit: Margin and Total Expenses (in that order):
@RELATIVE(Profit,-1)