Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
Good morning People
I am struggling with a cumulative formula. The following formula calculates my total mass for each trading day perfectly. How do I convert it to a cumulative formula:
CALCULATE (
SUM ( Master[Mass(kg)] ),
FILTER (
Master,
Master[Trading Day]
<= MAXX ( FILTER ( Master, Master[Sales Year] = 2018 ), Master[Trading Day] )
&& Master[Sales Year] = 2017
)
)
Thank you
Herbz
Solved! Go to Solution.
@Anonymous,
For the cumulative sum, you could try with the DAX fomula in a new measure like:
Cumulative Sum =
CALCULATE (
SUM ( Master[Mass(kg)]),
FILTER (
ALL ( Master[Trading Day],Master[Sales Year]),
Master[Trading Day]<= MAXX ( FILTER ( Master, Master[Sales Year] = 2018 ), Master[Trading Day] )
&& Master[Sales Year] = 2017
)
)
A sample result I got is like:
Regards,
Charlie Liao
@Anonymous,
For the cumulative sum, you could try with the DAX fomula in a new measure like:
Cumulative Sum =
CALCULATE (
SUM ( Master[Mass(kg)]),
FILTER (
ALL ( Master[Trading Day],Master[Sales Year]),
Master[Trading Day]<= MAXX ( FILTER ( Master, Master[Sales Year] = 2018 ), Master[Trading Day] )
&& Master[Sales Year] = 2017
)
)
A sample result I got is like:
Regards,
Charlie Liao
Perfect solution, thank you very much Charlie
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 22 | |
| 22 | |
| 21 | |
| 20 | |
| 12 |
| User | Count |
|---|---|
| 58 | |
| 55 | |
| 42 | |
| 36 | |
| 35 |