Time Series Functions

Time series functions are aggregate functions that operate on time dimensions.

The time dimension members must be at or below the level of the function. Because of this, one or more columns that uniquely identify members at or below the given level must be projected in the query.

Function Example Description

Ago

SELECT Year_ID, Ago(sales, year, 1)

Calculates the aggregated value of a measure from the current time to a specified time period in the past. For example, AGO can produce sales for every month of the current quarter and the corresponding quarter-ago sales.

Periodrolling

SELECT Month_ID, Periodrolling (monthly_sales, -1, 1)

Computes the aggregate of a measure over the period starting x units of time and ending y units of time from the current time. For example, PERIODROLLING can compute sales for a period that starts at a quarter before and ends at a quarter after the current quarter.

ToDate

SELECT Year_ID, Month_ID, ToDate (sales, year)

Aggregates a measure from the beginning of a specified time period to the currently displayed time. For example, this function can calculate Year to Date sales.