HIER_DEPTH

HIER_DEPTH returns a number representing the level depth of either all members of a hierarchy or a particular member, where 0 is the top level. The hierarchy can be either level-based or value-based.

Return Value

NUMBER

Syntax

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

Arguments

member is a value of hierarchy whose depth is calculated. Otherwise, the depth 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 depth of each member of the Calendar hierarchy.

HIER_DEPTH(GLOBAL.TIME.CALENDAR)

Example 1
Member Depth
2003 0
Q3-03 1
Jul-03 2

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

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

Example 2
Member Depth
Jul-03 2