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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anton0315
Frequent Visitor

Running Total reset by own value

I want for the month when the cumulative sum first exceeds 3000, to show the remaining private km above 3000, and for subsequent months after the reset, to show the normal sum of private km.

I'm using this Dax formula:
Cumulative_Private_KM =  
VAR CmulativesSum = IF(SUM(data[Private KM] <> blank() , 
                                           CALVULATE(SUM(date[Private KM]) , 'Calendar' [date] <= max('Calendar' [date])
                                     RETURN 
                                               IF(CumulativeSum > 3000, sum(data[Private KM] , CumulativeSum)


Is this possible or i just imagine it is because i have tried several functions and it is not working.
 
 
Thank you in Advance!!!


2 REPLIES 2
v-weiyan1-msft
Community Support
Community Support

Hi @Anton0315 ,


Can you share sample data and the results you are hoping for? Show it as a screenshot or excel. Or a sample pbix after removing sensitive data. We can better understand the problem and help you.

 

Best Regards,
Yulia Yan

Hello v-weiyan1-msft

Anton0315_0-1708589650512.png

So what i want is okay because i have restarted the running total.
But for August month it is a wrong result because this is the month it reaches 3000 km 

What i want only for the month wich reaches the 3000km is to show not 919 because this is the private km for the month but the remaining km of the 3000 so it should be 477. For september and october the private km are right I want to keep the values there

Thank you in advance

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors
Top Kudoed Authors