Running Totals for Core Functions

Running Totals for Core Functions take the running sum, average, minimum, or maximum of a project fact or metric. In a table broken down by a date attribute, the running total value on any given day would be calculated by aggregating values from all prior days along with that of the current day.

Running total metrics can be broken down by two or more date attributes from the same date dimension. Non-date attributes are not supported.

Syntax

SELECT RUNSUM(...)
SELECT RUNAVG(...)
SELECT RUNMIN(...)
SELECT RUNMAX(...)
SELECT RUNSUM(...) WITHIN (...)

The value for WITHIN must be a date attribute.

SELECT RUNSUM(...) WITHIN (ALL OTHER)

Examples

SELECT RUNSUM(Sales)
SELECT RUNSUM(Sales) WITHIN(Week)
SELECT RUNSUM(Sales) WITHIN(Week) BY Date,Region
SELECT RUNMIN(Probability) WHERE Year = THIS AND Amount > 500000
SELECT RUNMAX(Opportunity) BY Quarter/Year
SELECT RUNMAX(Sales) WITHIN (Year) WITHOUT PARENT FILTER