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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It 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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.