Running total of all sales to date with FILTER and ALL

Build a cumulative running total that never resets, using CALCULATE, FILTER, ALL and MAX on the date table, the classic DAX running-total pattern.

You will learn to

  • Write the classic running-total pattern
  • Explain why ALL is needed inside FILTER
  • Read a cumulative line that never resets

How it works

A **running total** (cumulative total) adds up everything from the very first day up to the period you are looking at. It never resets, so the last point equals the grand total.

The classic pattern has three parts:

- `ALL('Date'[Date])` gives every date, ignoring the row. Without it, `FILTER` would only see the row’s own month and could never reach back to earlier ones. - `FILTER(…, 'Date'[Date] <= MAX('Date'[Date]))` keeps the dates up to the end of the row. `MAX` is worked out once, in the row’s filter context, before FILTER starts walking the dates. - `CALCULATE([measure], …)` evaluates the measure over those dates.

The same pattern works for any measure, and with a different column it gives a running total over anything that has an order.

Practice it hands-on with a real data model and a live report that updates as you type.

Units To Date = CALCULATE([Total Quantity], FILTER(ALL('Date'[Date]), 'Date'[Date] <= MAX('Date'[Date])))