18.3A running total from the start

Sometimes you will want a running total that never starts over from zero. The running totals seen so far, from the start of the month, the quarter or the year, start over from zero with each period. You will write this one with pieces you already know, FILTER, ALL, MAX and the order in which CALCULATE works. The WINDOW function, covered later, can do it too.

18.3.1The formula

Let us place this measure in a table by year:

Running Total Revenue = VAR LastDay = MAX( Calendar[Date] ) RETURN CALCULATE( [Revenue], FILTER( ALL( Calendar[Date] ), Calendar[Date] <= LastDay ) )
Power BI accepts this DAX foryes, Measureyes, Calculated columnno, Calculated tableno, Virtual table
In plain words

“I want the revenue, first setting aside the last date shown, then going through all the days of the calendar, even those that were left out, and keeping only those up to that date.”

Table visual, The “Running Total Revenue” measure by year
YearRunning Total Revenue
2024750,000
20251,700,000
Total1,700,000

This is a reproduction of the Power BI interface for teaching purposes. It differs from the real interface.

On the 2025 row, the running total starts from the first sales of 2024 and goes to the end of 2025.

The rest of this lesson is part of izyDAX Pro

You have just read the first section. The next one, its animations, the exercises and the summary are waiting for you with izyDAX Pro, in a single payment.