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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

DAX Create table with each day of a month and accumulated sales for each day

Hello,

 

From a simple fact table of sales which shows the date of the sale and the amount ($) sold, connected to a Calendar table, I'm trying to find some function or group of functions that return a 2 column table according to a month defined in the function: Day of the month | Accumulated Sale

 

The accumulated sale to each of those days of the month, would also need to consider the sales of previous months.

 

I've tried using SUMMARIZE per day, and an acumulative function with CALCULATE and ALL, but I think it is not working because of the way SUMMARIZE creates the filter context.

 

Thank you very much,

 

Jesus 

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , Sample data would have helped. With help from a date table

example

Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected(date),date[date] <=max(date[date])))

 

Without date table 

Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected(Sales),Sales[Sales Date] <=max(Sales[Sales Date])))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Not clear what you're trying to do. Are you trying to create a calculated table in the model? A measure can't return a table, so it can't be a measure.

Anonymous
Not applicable

Yes, I want to create a calculated table in the model, or most probably I would use it as a virtual table in a measure.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.