A running total adds each row to the sum of the rows before it: sales so far this year, cumulative sign-ups, a stock balance. In QuickSight it is a table calculation, runningSum, computed on the rows the visual shows after it has aggregated them.

Copy and paste

Running total by month:

runningSum(sum({Sales}), [truncDate('MM', {Order Date}) ASC])

One running total per region:

runningSum(sum({Sales}), [truncDate('MM', {Order Date}) ASC], [{Region}])

Running count of orders:

runningSum(count({Order ID}), [truncDate('MM', {Order Date}) ASC])

Put {Order Date} in the visual with the Month aggregation, and add {Region} when the formula partitions by it.

Example

Month Sales Running total
Jan 2026 100 100
Feb 2026 120 220
Mar 2026 90 310
Apr 2026 110 420
May 2026 130 550
Jun 2026 100 650

The three arguments

The sort uses truncDate('MM', ...) to match a visual that shows months, as in the AWS example. If the visual shows days, sort by {Order Date} itself.

Filters cut the history

Table calculations come after filters in QuickSight’s order of evaluation. Filter the visual to April–June and the running total starts again from April: 110, 240, 340, instead of 420, 550, 650.

That is right for “cumulative sales in the selected period” and wrong for a balance that should carry the earlier months. To show only some months without losing the history, keep all months in the data and hide the early ones with a filter on a table calculation, which is applied after the running total is computed. The same technique is shown in how to calculate a rolling 12-month total.

Missing months

A month without sales has no row, so the line goes straight from the month before to the month after. For a running total that is harmless, since the value would not change. It matters for moving averages and rolling sums, which count rows; see how to calculate a moving average.

Resetting every year

Partition by the year to start again on 1 January, or use periodToDateSumOverTime, which does it without a partition field: how to calculate a running total that resets every year.

Checked against the Amazon Quick Sight function reference (October 2026). The example results were recomputed in DuckDB.

References