COUNT

COUNT tallies the number of data values identified by a selection of members in a Time dimension.

Return Value

NUMBER

Syntax

COUNT (value_expr) OVER HIERARCHY 
      ( [ dimension | hierarchy ]
	     BETWEEN start AND end [WITHIN relation]
      )

Arguments

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:

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.

Example

COUNT(GLOBAL.UNITS_CUBE.UNITS) OVER HIERARCHY (GLOBAL.TIME.CALENDAR BETWEEN UNBOUNDED PRECEDING AND CURRENT MEMBER WITHIN LEVEL)

Related Topics

AVG, MAX, MIN, SUM