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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
akhassim
New Member

undefined

I need to calculate a cumulative total.

How do I do this

akhassim_0-1696581689495.png

 

2 REPLIES 2
ChiragGarg2512
Solution Sage
Solution Sage

@akhassim , If the requirement is to continue addition even when the year ends, so the dax will work some thing like this

 

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

 

Cumm Based on Date = CALCULATE([Net], Window(1,ABS,0,REL, ALL('date'[date]),ORDERBY('Date'[date],ASC)))

 

If the sum has to reset every year, the dax will work something like this:

YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))

 

Thank You.

some_bih
Community Champion
Community Champion

Hi @akhassim please create measure as below Cumulative test.

If you do not have already Calendar / Date table, create one using link as instruction below

 

Cumulative test =
VAR __max_date = MAX ( 'Date'[Date] ) -- your Date table
RETURN
CALCULATE (
SUM(Cost Actual)],
'Date'[Date] <= __max_date,
ALL ( Date )
)

 

Create Calendar Table Microsoft Learn

https://learn.microsoft.com/en-us/power-bi/guidance/model-date-tables

 

Did I answer your question? Kudos appreciated / accept solution!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.