Oracle® OLAP Expression Syntax Reference Release 11.2 Part Number E23381-01 |
|
|
PDF · Mobi · ePub |
HIER_CHILD_COUNT
returns the number of children of either all dimension members in a hierarchy or a particular member. The hierarchy can be either level-based or value-based.
NUMBER
HIER_CHILD_COUNT ( [member_expression] [WITHIN] {DIMENSION dimension_id | HIERARCHY hierarchy_id} )
Identifies a single dimension member within the hierarchy used for the calculation. If this optional argument is specified, then the result does not vary across dimension members.
The dimension over which the values are calculated using the default hierarchy.
The hierarchy over which the values are calculated. If dimension_id
is used instead, the default hierarchy is used.
This example returns the number of children for each member of the default hierarchy of the Time dimension.
HIER_CHILD_COUNT(DIMENSION "TIME")
Time | Children |
---|---|
2006 | 4 |
Q1.06 | 3 |
Q2.06 | 3 |
Q3.06 | 3 |
Q4.06 | 3 |
JAN-06 | 0 |
FEB-06 | 0 |
MAR-06 | 0 |
APR-06 | 0 |
MAY-06 | 0 |
JUN-06 | 0 |
JUL-06 | 0 |
AUG-06 | 0 |
SEP-06 | 0 |
OCT-06 | 0 |
NOV-06 | 0 |
DEC-06 | 0 |
The next example returns 8
as the number of children for Government within the Market hierarchy of the Customer dimension.
HIER_CHILD_COUNT('GOV' WITHIN HIERARCHY CUSTOMER.MARKET)