@LEVMBRS
The @LEVMBRS calculation function for Essbase returns members of a specified dimension and level.
Syntax
@LEVMBRS (dimName, levName|levNum)
Parameters
Notes
-
If you specify a name for the levName parameter, Essbase looks for a level with that name in the specified dimension.
-
If you specify a number for the levName parameter (for example, 2), Essbase first looks for a level with a number string name. If no level name exists with that name, Essbase checks to see if the parameter is a valid level number.
-
If you specify a temporary variable for the levName parameter, Essbase does not recognize the value of the variable. It looks in the outline for a level name with the same name as the temporary variable.
-
For more information about levels and defining level names, see Generations and Levels.
-
Essbase sorts the generated list of members in ascending order. Using Sample Basic as an example, if you specify
@LEVMBRS(Product,1)
, Essbase returns 100, 200, 300, 400, Diet (in that order). This order is important to consider when you use @LEVMBRS with certain forecasting and statistical functions. -
If you use a negative number for the level number, no syntax error is noted, but the calculation will fail with an error message.
Example
In the Sample Basic cube:
@LEVMBRS(Measures,"Profit and Loss")
@LEVMBRS(Measures,0)
both return the following members if level 0 of the Measures dimension is named Profit and Loss:
Sales, COGS, Marketing, Payroll, Misc, Opening Inventory, Additions, Ending Inventory, Margin %, Profit %, and Profit per Ounce (in that order).
@LEVMBRS(Scenario,0)
Returns Actual, Budget, Variance, and Variance %.
The following example restricts the calculation to members with the combination Budget and one of the members of the Market dimension with a level name of "State".
FIX (Budget,@LEVMBRS(Market,State))
CALC DIM (Year,Measures);
ENDFIX
See Also