Skip Headers
Previous
Previous
 
Next
Next

Moving Total

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

Template

Moving total (sum) 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 total number of units within a range of two time periods: the current time period and the previous period.

Calculation

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

OLAP Expression Syntax

SUM(UNITS_CUBE.UNITS) OVER HIERARCHY (TIME.CALENDAR BETWEEN 1 PRECEDING AND CURRENT MEMBER WITHIN LEVEL)

Query Results

The Total column shows the total number of units calculated using the current quarter and the preceding quarter.

Time   Level                  Units   Total
------ -------------------- ------- -------
Q1.05  CALENDAR_QUARTER      143607  293135
Q2.05  CALENDAR_QUARTER      138096  281703
Q3.05  CALENDAR_QUARTER      138953  277049
Q4.05  CALENDAR_QUARTER      145062  284015
Q1.06  CALENDAR_QUARTER      146819  291881
Q2.06  CALENDAR_QUARTER      145233  292052
Q3.06  CALENDAR_QUARTER      143572  288805
Q4.06  CALENDAR_QUARTER      149305  292877