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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
dw700d
Post Patron
Post Patron

Running Total by Date

I am trying to create a running total for the sum column by date for the below table. How can I accomplish this by creating a measure?

 

Date        Type      Spend
7/27/2020         EPL       1000
7/27/2020       GSCS       1500
7/27/2020          EPL        3000
7/27/2020          EPL       2000
7/28/2020       GSCS         1200
7/28/2020       GSCS       1400
7/282020         EPL        900
7/29/2020       GSCS       750
7/29/2020         EPL      1200
7/29/2020      GSCS      1400

 

1 ACCEPTED SOLUTION
Tahreem24
Super User
Super User

@dw700d ,

Try this:

CALCULATE(SUM(Sheet4[Value]),FILTER(ALL(Sheet4),Sheet4[Date]<=MAX(Sheet4[Date])))
 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

View solution in original post

4 REPLIES 4
dw700d
Post Patron
Post Patron

Thank you all for your prompt responses

amitchandak
Super User
Super User

@dw700d , Try with date table

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

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-Y...


Appreciate your Kudos.

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

 

Hi @dw700d 

Try this measure

RuningTotal = 
 VAR selectedDate = SelectedValue(Table[Date])
 VAR FilteredTable = Filter(
                       All(Table)
                       , Table[Date] <=selectedDate
                      ) 
Return Sumx(filteredTable, Table[Spend])

Hope this helps.

Thanks

 

Tahreem24
Super User
Super User

@dw700d ,

Try this:

CALCULATE(SUM(Sheet4[Value]),FILTER(ALL(Sheet4),Sheet4[Date]<=MAX(Sheet4[Date])))
 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.