Running Aggregates Tutorial
This tutorial builds a cumulative cost trend chart with a rolling average overlay using running aggregates in the Report Forge Output Designer.
Goal: A combo chart showing period-by-period cost as bars and cumulative cost as a line — with a secondary line showing the 3-period rolling average for trend smoothing.
Assumed blueprint structure: A repeating section called "Cost Report" with fields:
Period— Select (Jan, Feb, Mar, …) or DatePeriodCost— CurrencyBudgetCost— Currency
Step 1 — Open the Output Designer
- Open the blueprint → click Output Designer.
- Select the output template to edit (or create a new one).
- Navigate to the page where the cost chart will go.
Step 2 — Add a Combo Chart component
- In the component panel (left sidebar), drag a Chart component onto the canvas.
- In Chart settings → Chart type, select Combo (Bar + Line).
- Set chart title:
Cumulative Cost Trend.
Step 3 — Configure the X-axis (period dimension)
- Open the Data panel → X-axis.
- Set Dimension source to the
Cost Reportsection. - Set Dimension field to
Period. - Set Sort to
Ascending(earliest period first).
The X-axis now shows the reporting periods in chronological order.
Step 4 — Add the Period Cost bar series
- In Series, click + Add series.
- Set Series type to Bar.
- Set Series label to
Period Cost. - Set Value source to
Cost Report. - Set Value field to
PeriodCost. - Set Aggregation to
Sum(sum within each period if multiple rows exist per period). - Set Y-axis to Primary.
- Style: colour
#4A90D9(blue), bar width 70%.
Step 5 — Add the Budget Cost bar series
- Click + Add series → Bar.
- Set Series label to
Budget Cost. - Set Value field to
BudgetCost, Aggregation toSum. - Set Y-axis to Primary.
- Style: colour
#BDBDBD(grey), bar width 70%, Stacking: None, Opacity: 60%.
The two bars now appear side-by-side per period.
Step 6 — Add the Cumulative Cost running_sum line
- Click + Add series → Line.
- Set Series label to
Cumulative Cost. - Set Value source to Running aggregate.
- Configure running aggregate:
| Setting | Value |
|---|---|
| Source field | PeriodCost |
| Aggregate type | running_sum |
| Sort field | Period |
| Sort direction | Ascending |
| Reset on group | Off (accumulate across all periods) |
- Set Y-axis to Secondary (the cumulative total is much larger than period values — secondary axis keeps the scale readable).
- Style: colour
#E5A500(amber), line width 2px, solid, no markers.
Step 7 — Add the Rolling Average running_avg line
The 3-period rolling average uses running_avg on the same field — it shows the average cost per period up to and including each point, smoothing out spikes.
- Click + Add series → Line.
- Set Series label to
Rolling Average. - Set Value source to Running aggregate.
- Configure:
| Setting | Value |
|---|---|
| Source field | PeriodCost |
| Aggregate type | running_avg |
| Sort field | Period |
| Sort direction | Ascending |
| Reset on group | Off |
- Set Y-axis to Primary (the rolling average is in the same range as period costs).
- Style: colour
#E57373(red), line width 2px, dashed, show point markers.
running_avg in Report Forge is a cumulative average — it averages all values from the first period up to the current one. A true 3-period rolling window (average of only the last 3 periods) requires an expression-based calculated field approach, which is not covered in this tutorial.
Step 8 — Configure the secondary Y-axis
- Open Y-axis settings → Secondary axis.
- Enable secondary axis.
- Set label:
Cumulative Cost ($). - Set format: Currency, 0 decimal places.
- Enable Grid lines: Off (to avoid visual clutter with two axis grid systems).
Primary axis settings:
- Label:
Period Cost ($) - Format: Currency, 0 decimal places
- Grid lines: On
Step 9 — Add a legend
- Open Legend settings.
- Enable legend.
- Position: Bottom.
- Show all four series in the legend: Period Cost, Budget Cost, Cumulative Cost, Rolling Average.
Step 10 — Add a data table below the chart
A data table beneath the chart gives reviewers precise values that are hard to read from the chart.
- Drag a Table component beneath the chart.
- Set data source to
Cost Report, sorted byPeriodascending. - Add columns:
| Column | Field | Aggregation |
|---|---|---|
| Period | Period | None |
| Period Cost | PeriodCost | Sum |
| Budget Cost | BudgetCost | Sum |
| Cumulative Cost | — | Running aggregate: running_sum on PeriodCost |
| vs Budget | — | Calculated: [PeriodCost] - [BudgetCost] |
- Add conditional formatting to the "vs Budget" column: values below 0 → red text.
Step 11 — Preview and verify
- Click Preview in the Output Designer toolbar.
- Select a test edition with at least 4 periods of data.
- Verify:
- Bar heights match the period cost values in your edition data.
- The Cumulative Cost line increases monotonically (never goes down, assuming all costs are positive).
- The Rolling Average line starts at the period 1 value (same as Cumulative ÷ 1) and settles toward the true average over time.
- The secondary axis scale does not overlap the primary axis labels.
Common issues:
- All bars the same height: Check that the X-axis dimension is not grouping all periods into one — verify the
Periodfield has unique values per row. - Line starts at zero: Check the running aggregate sort field matches the X-axis dimension field.
- Secondary axis numbers too small: Increase the axis minimum to 0 and let Report Forge scale the max automatically.
The finished chart
Your completed chart shows:
- Grey bars: Budget cost per period (what was planned).
- Blue bars: Actual period cost (what was spent).
- Amber line (secondary axis): Cumulative actual cost climbing through the programme.
- Dashed red line (primary axis): Rolling average of actual period cost — shows whether spend per period is trending up or down.
This combination gives project managers both the period detail (bar chart) and the programme trend (cumulative line) in a single chart — with the rolling average helping identify spend acceleration or deceleration.
Related
- Running Aggregates — full guide for all running aggregate types and configuration
- Running Aggregates Reference — syntax, reset behaviour, and edge cases
- Output Designer Overview — navigating the Output Designer
- Computed Fields KPI Page tutorial — applying expressions to build KPI cards