Skip Headers
Previous
Previous
 
Next
Next

Moving Average

Calculates an average for a fixed number of consecutive time periods surrounding the current period.

Template

Moving average of measure (...) in the time dimension and time hierarchy hierarchy. Include number preceding and number following members within { level | parent | ancestor at level level | Gregorian level }.

Example

This calculated measure computes the average number of units within a range of three time periods: the current time period, the preceding period, and the following period.

Calculation

Moving average of UNITS(...) in the TIME dimension and TIME.CALENDAR hierarchy. Include 1 preceding and 1 following members within level.

OLAP Expression Syntax

AVG(UNITS_CUBE.UNITS) OVER HIERARCHY (TIME.CALENDAR BETWEEN 1 PRECEDING AND 1 FOLLOWING WITHIN LEVEL)

Query Results

The Average column shows the moving average of Units.

Time   Level                  Units Average
------ -------------------- ------- -------
Q1.05  CALENDAR_QUARTER      143607  143744
Q2.05  CALENDAR_QUARTER      138096  140219
Q3.05  CALENDAR_QUARTER      138953  140704
Q4.05  CALENDAR_QUARTER      145062  143611
Q1.06  CALENDAR_QUARTER      146819  145705
Q2.06  CALENDAR_QUARTER      145233  145208
Q3.06  CALENDAR_QUARTER      143572  146037
Q4.06  CALENDAR_QUARTER      149305  146439