COUNT tallies the number of data values identified by a selection of members in a Time dimension.
NUMBER
COUNT (value_expr) OVER HIERARCHY
( [ dimension | hierarchy ]
BETWEEN start AND end [WITHIN relation]
)
value_expr is a dimensional expression whose values you want to calculate.
dimension is the Time dimension over which the values are calculated.
hierarchy is the hierarchy over which the values are calculated. Otherwise, the default Time hierarchy is used.
start and end are the boundaries of the calculation, which are expressed with one of these clauses:
[UNBOUNDED | number]{ PRECEDING | FOLLOWING } identifies a range of dimension members within the group defined by relation for the calculation.
UNBOUNDED starts with the first member or ends with the last member of the group. number identifies a dimension member at a particular distance from the current member. CURRENT MEMBER starts or ends the calculation at the current member. relation can be any of the following. The GREGORIAN relations superimpose the Gregorian calendar on the Time dimension. These relations can be useful for calculations on fiscal and non-standard hierarchies.
PARENT includes members at the same level with the same parent in the calculation.
LEVEL includes all members at the same level in the calculation.
ANCESTOR AT LEVEL level includes members at the same level and with the same ancestor at a specified level.
GREGORIAN YEAR calculates Time periods within the same Gregorian year.
GREGORIAN QUARTER calculates Time periods within the same Gregorian quarter.
GREGORIAN MONTH calculates Time periods within the same Gregorian month.
GREGORIAN WEEK calculates Time periods within the same Gregorian week.
COUNT(GLOBAL.UNITS_CUBE.UNITS) OVER HIERARCHY (GLOBAL.TIME.CALENDAR BETWEEN UNBOUNDED PRECEDING AND CURRENT MEMBER WITHIN LEVEL)
Copyright © 2003, 2007, Oracle. All rights reserved.