Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
JamesGordon
Helper II
Helper II

Cumulative Total

Hi,

 

I am really struggling to get my montly sales to cumulative total. I have tried numerous DAX and varations on date tables but still cannot get the data to count cumulatively.

 

In order to calculate my YTD total sales i have created a DAX as below to filter the relevant rows.

Total All Sales YTD = CALCULATE(SUM('Sheet (2)'[Total Sell]), FILTER('Sheet (2)', 'Sheet (2)'[Status] = "S"), filter('Sheet (2)', 'Sheet (2)'[Total Cost]>100))
 
Could this be affecting my results?
Below is how the data looks if i put it into a table
 
Power Bi ques 16.jpg
 
Power BI appears to have already created a date table from my "Invoice Date" column.
 
IS there a simple DAX that can count each months sales to create a cumulative total againt month?
 
Thanks in advance!
4 REPLIES 4
Anonymous
Not applicable

To be able to create YTD measures you need to have a calendar in your model. Having dates in your fact tables and operating on them directly is a sure way to fail.

Please follow the guidelines of dimensional design (star schema) and you'll be writing simple and correct DAX in no time.

Best
D
Anonymous
Not applicable

Thanks @Anonymous 

 

I have seen those posts and this is the result i get.

A side from the values being wrong (because i need to add some filters) they are still not adding cumulatively?

 

Power Bi ques 17.jpg

Anonymous
Not applicable

What does EARLIER do in the measure?

Best
D

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.