Skip Headers
Previous
Previous
 
Next
Next

Moving Maximum

Returns the largest value among a fixed number of consecutive time periods surrounding the current period.

Template

Moving maximum 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 returns the largest number of units from within a range of three time periods: the current period and the two preceding periods.

Calculation

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

OLAP Expression Syntax

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

Query Results

The Maximum column shows the largest number of Units between the current quarter and the two previous quarters.

Time   Level                  Units Maximum
------ -------------------- ------- -------
Q1.05  CALENDAR_QUARTER      143607  149528
Q2.05  CALENDAR_QUARTER      138096  149528
Q3.05  CALENDAR_QUARTER      138953  143607
Q4.05  CALENDAR_QUARTER      145062  145062
Q1.06  CALENDAR_QUARTER      146819  146819
Q2.06  CALENDAR_QUARTER      145233  146819
Q3.06  CALENDAR_QUARTER      143572  146819
Q4.06  CALENDAR_QUARTER      149305  149305