A running total (also called a cumulative total) shows how a number grows over time: sales so far this year, customers added to date, or tickets closed up to today. It is one of the most requested calculations in Power BI reports, and also one of the most confusing for beginners.
In this guide you will learn 4 easy ways to create a running total in Power BI, when to use each one, and how to fix the most common problems.
Quick answer: The classic running total measure isCALCULATE ( [Total Sales], FILTER ( ALLSELECTED ( 'Date'[Date] ), 'Date'[Date] <= MAX ( 'Date'[Date] ) ) )
It adds up sales for every date up to the date in the current row. UseTOTALYTDif the total should restart every year.
What a running total looks like
Here is a simple monthly example. The running total adds each month's sales to everything before it:
| Month | Sales | Running Total |
|---|---|---|
| January | 100 | 100 |
| February | 150 | 250 |
| March | 120 | 370 |
| April | 200 | 570 |
All methods below start from one simple base measure:
Total Sales = SUM ( Sales[Amount] )
You also need a proper date table marked as a date table and connected to your sales table. Running totals on the date column inside the sales table often break when some dates have no sales.
Method 1: Classic running total with CALCULATE and FILTER
This is the method you will see most often, and it works in every version of Power BI.
Running Total =
CALCULATE (
[Total Sales],
FILTER (
ALLSELECTED ( 'Date'[Date] ),
'Date'[Date] <= MAX ( 'Date'[Date] )
)
)
How it works
MAX ( 'Date'[Date] )finds the last date of the current row. For "March" that is 31 March.ALLSELECTED ( 'Date'[Date] )removes the row's date filter but keeps your slicer selection.FILTERkeeps every date up to that last date, andCALCULATEadds up sales for all of them.
ALL or ALLSELECTED? With ALLSELECTED, the running total starts from the first date in your slicer. With ALL, it always starts from the very first date in the data, even if the user selected only 2026. Most reports want ALLSELECTED.
New to CALCULATE and filter context? Read Understanding CALCULATE in DAX first.
Method 2: Running total that resets every year (YTD)
Finance teams usually want the total to start again from zero every January. That is a year-to-date running total, and DAX has a built-in function for it:
Sales YTD =
TOTALYTD ( [Total Sales], 'Date'[Date] )
Or the same thing with CALCULATE:
Sales YTD =
CALCULATE ( [Total Sales], DATESYTD ( 'Date'[Date] ) )
Does your financial year start in April? Add the year-end date as the last argument:
Sales FYTD =
TOTALYTD ( [Total Sales], 'Date'[Date], "3/31" )
For month-to-date and quarter-to-date, use TOTALMTD and TOTALQTD. More examples are in Time Intelligence in Power BI: DATESYTD, DATESMTD and DATESQTD.
Method 3: Running total by category (Pareto / 80-20 analysis)
Sometimes the running total is not over time, but over a list sorted by value. For example: "Our top products make up what share of sales?" This is called a Pareto or 80-20 analysis.
Running Total by Product =
VAR CurrentSales = [Total Sales]
RETURN
CALCULATE (
[Total Sales],
FILTER (
ALLSELECTED ( 'Product'[Product] ),
[Total Sales] >= CurrentSales
)
)
Running % of Sales =
DIVIDE (
[Running Total by Product],
CALCULATE ( [Total Sales], ALLSELECTED ( 'Product'[Product] ) )
)
Sort the table by Total Sales (highest first) and you get:
| Product | Sales | Running Total | Running % |
|---|---|---|---|
| A | 500 | 500 | 50% |
| B | 300 | 800 | 80% |
| C | 150 | 950 | 95% |
| D | 50 | 1,000 | 100% |
Here products A and B together bring 80% of sales. Note: if two products have exactly the same sales, both get the same running total. If that matters, break ties with a ranking first. See Mastering RANKX in Power BI.
Method 4: No-code options (Quick measure and visual calculations)
If you do not want to write DAX yourself, Power BI can create it for you:
- Quick measure: right-click your table in the Data pane → New quick measure → choose Running total, pick your base value and the date field. Power BI writes a measure similar to Method 1. Open it afterwards to learn from the code.
- Visual calculations: in newer versions of Power BI Desktop, select a visual → New calculation and write
Running Total = RUNNINGSUM ( [Total Sales] ). The calculation lives only inside that visual, so it is quick but cannot be reused in other visuals.
Which method should you use?
| You need… | Use |
|---|---|
| A running total over time that respects slicers | Method 1 (CALCULATE + ALLSELECTED) |
| A total that restarts every year, quarter or month | Method 2 (TOTALYTD / TOTALQTD / TOTALMTD) |
| Top products or customers and their share (80-20) | Method 3 (running total by category) |
| A fast result in one visual, no DAX | Method 4 (Quick measure or visual calculation) |
Common problems and how to fix them
The running total is the same as the normal sales
Your measure is not removing the row's date filter. Make sure you use ALLSELECTED or ALL on the date table column that is used in the visual, not on a column from the sales table.
The running total goes flat or jumps
You are probably using the date column from the sales table, which has gaps. Use a separate date table with every day, mark it as a date table, and put its columns in the visual.
It works by date but not by month name
Month names sort alphabetically (April, August, …). Sort the month name column by month number, and keep the running total measure based on the Date column as in Method 1.
The total row shows a strange number
That is normal: the total row shows the running total at the last date. If you prefer, hide it with IF ( ISINSCOPE ( 'Date'[Month] ), [Running Total] ). Read more in Power BI Total Wrong? How to Fix Incorrect DAX Totals.
The report becomes slow
Method 1 is fast on a date table. It gets slow if you use FILTER ( ALL ( Sales ), … ) over the whole sales table. Always filter the date column, not the fact table.
Frequently asked questions
What is the DAX formula for a running total in Power BI?
CALCULATE ( [Total Sales], FILTER ( ALLSELECTED ( 'Date'[Date] ), 'Date'[Date] <= MAX ( 'Date'[Date] ) ) ). It adds sales for all dates up to the date in the current row.
How do I make a running total reset every year?
Use TOTALYTD ( [Total Sales], 'Date'[Date] ). For a financial year ending 31 March, add "3/31" as the third argument.
What is the difference between a running total and a cumulative total?
They are the same thing. Both add each value to all the values before it.
Can I create a running total without a date table?
Yes, by using the date column of your sales table, but it may give wrong or flat results when some dates have no sales. A date table is strongly recommended.
How do I show a running total as a percentage?
Divide the running total by the grand total: DIVIDE ( [Running Total], CALCULATE ( [Total Sales], ALLSELECTED ( 'Date'[Date] ) ) ), then format the measure as a percentage.
Keep learning
Running totals are part of time intelligence, one of the most useful skills in DAX. Follow the full Free Power BI Course (138 lessons) to master it step by step, and keep the Power BI DAX Cheat Sheet open while you practise.
Which method did you use? If your running total still looks wrong, share your measure in the comments and I will help you fix it.
