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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.