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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
bo_wang5
Helper II
Helper II

Cumulative total by Date and Category Measure not working

Hi All,


I am trying to write a measure to calcuate cumulative totals by date and category.  I'm not sure what I am missing. the top graphic shows visualization for Amount Total which behaves correctly.  However when I try to show cumulative totals by subcategory its not correct.  Thanks for any tips on the measure thanks.

 

Amount Total = 

sum('Sales Data'[Amount])

 

Cumulative Total =
Calculate([Amount Total],
Filter(ALLSELECTED('Sales Data'),
'Sales Data'[Close Date]<=MAX('Sales Data'[Close Date])
))

 

bo_wang5_3-1643648644544.png

 

 

2 REPLIES 2
v-jayw-msft
Community Support
Community Support

Hi @bo_wang5 ,

 

You are using [Close Date] in your formula, you will need to put it into Rows field.

If it doesn't work, please share some sample data so that we could test the formulas.

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
TheoC
Super User
Super User

Hi @bo_wang5 

 

Can you try use something like:

 

Measure = CALCULATE ( [Amount Total] , DATESYTD ( 'Date'[Date] )

 

Given that the Business Units and the Months are already categorised in the Matrix Table, you shouldn't have any issues using the above measure (unless you don't have a Date table?).

 

If you don't have a Date table, you can use the following:

 

Measure = TOTALYTD ( [Amount Total] , 'Sales Data'[Close Date] )

 

Hope this helps 🙂


Theo

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors