HierarchyCount
HierarchyCount returns the number of hierarchies from the specified dimension that are
referenced in the current cell being evaluated (rule context), not the total number of hierarchies
defined in the dimension. HierarchyCount is valid in rules only.
The HierarchyCount function cannot be used in TurboIntegrator processes. The presence of this function in a process will prevent the process from compiling.
Syntax
HierarchyCount (DimName);
|
Argument |
Description |
|---|---|
|
DimName |
A valid dimension name. |
Example
- Counting hierarchies in the current cell contextCube C1 has:
- Dimension
D1with hierarchiesD1H1,D1H2,D1H3 - Dimension
D2with hierarchiesD2H1,D2H2
Cell coordinates:
[D1H1M1, D1H2M1, D2H1M1]Results:HIERARCHYCOUNT('D1') = 2 // hierarchies in context: D1H1 and D1H2 HIERARCHYCOUNT('D2') = 1 // hierarchy in context: D2H1 - Dimension
- Single hierarchy per dimension
If the cell only references:
[D1H1M1, D2H1M1]Results:HIERARCHYCOUNT('D1') = 1 HIERARCHYCOUNT('D2') = 1