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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
sm1driver
New Member

DAX cumulative sum measure

Hi,

I need to produce a measure that's cumalative as per the weeks.
The summation needs to reset when the new year hits.

sm1driver_0-1736833004894.png

 

Any help would be appreciated.

1 ACCEPTED SOLUTION
anmolmalviya05
Super User
Super User

Hi , I hope you are doing good!

Please try the below solution:

Cumulative Amount =
VAR CurrentYear = MAX('Table'[Year])
VAR CurrentWeek = MAX('Table'[Week])
RETURN
CALCULATE(
SUM('Table'[Amount]),
FILTER(
ALL('Table'),
'Table'[Year] = CurrentYear &&
'Table'[Week] <= CurrentWeek
)
)

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

 

Let's Connect on LinkedIn: https://www.linkedin.com/in/anmol-malviya/?originalSubdomain=in

 

Subscribe my youtube channel for Microsoft Fabric and Power BI updates: https://www.youtube.com/@AnmolPowerBICorner



@sm1driver

View solution in original post

3 REPLIES 3
govind_021
Super User
Super User

Hi , @sm1driver 
You can also use Visual Level Calculation Running Sum formula
Go To Three dots in the visual and Select "new calculations" and use below formula

RUNNINGSUM([Amount], HIGHESTPARENT)

For more details check out this : https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-visual-calculations-overview

sm1driver
New Member

Thanks so much! Lifesaver!

anmolmalviya05
Super User
Super User

Hi , I hope you are doing good!

Please try the below solution:

Cumulative Amount =
VAR CurrentYear = MAX('Table'[Year])
VAR CurrentWeek = MAX('Table'[Week])
RETURN
CALCULATE(
SUM('Table'[Amount]),
FILTER(
ALL('Table'),
'Table'[Year] = CurrentYear &&
'Table'[Week] <= CurrentWeek
)
)

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

 

Let's Connect on LinkedIn: https://www.linkedin.com/in/anmol-malviya/?originalSubdomain=in

 

Subscribe my youtube channel for Microsoft Fabric and Power BI updates: https://www.youtube.com/@AnmolPowerBICorner



@sm1driver

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 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.