HIER_LEVEL

HIER_LEVEL returns the level of either all members of a hierarchy or a particular member. The hierarchy must be level-based.

Return Value

VARCHAR2

Syntax

HIER_LEVEL ( [ member [WITHIN] ]
             dimension | hierarchy) 

Arguments

member is a value of hierarchy whose level is calculated. Otherwise, the levels of all members of the hierarchy are calculated.

dimension is the dimension whose members are used in the calculation.

hierarchy is a hierarchy of dimension. Otherwise, the default hierarchy is used.

Example

The following example returns the level of each member of the Calendar hierarchy.

HIER_LEVEL(GLOBAL.TIME.CALENDAR)

Example 1
Member Level
2003 CALENDAR_YEAR
Q3-03 CALENDAR_QUARTER
Jul-03 MONTH

The next example returns the level of a single member in the default Fiscal hierarchy.

HIER_LEVEL('Jul-03' WITHIN GLOBAL.TIME)

Example 2
Member Level
Jul-03 MONTH