Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello everyone,
I am new to powerBI and I'm struggling to create a running total.
I only have one table, that looks like this :
SALES
MARKET A 100
MARKET A 50
MARKET B 30
MARKET C 600
MARKET C 400
MARKET D 700
What I need is a running total that would be ordered by number of sales per market (going from larger to smaller market), like this :
SALES. RUN-TOTAL
MARKET A 150 1850
MARKET B 30 1880
MARKET C 1000 1000
MARKET D 700 1700
Using quick measures, I have only been able to create running total ordered by market name, like this :
SALES. RUN-TOTAL
MARKET A 150 150
MARKET B 30 180
MARKET C 1000 1180
MARKET D 700 1880
I have also tried some things in DAX, but I am not familiar enough with it yet.
Thank you in advance !
Solved! Go to Solution.
Here is a measure expression that gets your desired result.
RT Market =
VAR vThisMarket =
MIN ( Sales2[Market] )
VAR vSummary =
ADDCOLUMNS (
ALLSELECTED ( Sales2[Market] ),
"cSales",
CALCULATE (
SUM ( Sales2[Sales] )
)
)
VAR vThisSales =
SUMX (
FILTER (
vSummary,
Sales2[Market] = vThisMarket
),
[cSales]
)
RETURN
SUMX (
FILTER (
vSummary,
[cSales] >= vThisSales
),
[cSales]
)
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 17 | |
| 9 | |
| 8 | |
| 7 |