Essbase @LEVMBRS

Returns all members with the specified level number or level name in
the specified dimension.

Syntax

@LEVMBRS (dimName, levName|levNum)
Parameter Description
dimName Dimension name specification.
levName|levNum A level name or an integer value that defines the number of a level.
The integer value must be 0 or a positive integer.

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 the Oracle Essbase Database Administrator’s Guide.
  • 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 the @LEVMBRS member
    set function 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 database:

@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

  • @GENMBRS