Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live 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
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 67 | |
| 44 | |
| 33 | |
| 27 | |
| 23 |
| User | Count |
|---|---|
| 137 | |
| 118 | |
| 58 | |
| 40 | |
| 35 |