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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.