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! Learn more

Reply
HerrPowerBI
New Member

Cumulative sum

Hello

 

I have a dataset where I'm trying to calculate the sum for each row (a cumulative sum). The dataset is ordered by a ranking that goes from 1-10. I have created a measure that works okay, but it's giving the same value for multiple rows when the ranking is the same. I understand why it happens (the filter finds more than one value and sums the table). How can I avoid this from happening? 

 

Here is an example dataset:

IDNameAmountRatingCumulative sum
1Ted100092000
2Morris100092000
3Harry100073000
4William100064000
5Sana100055000

 

 

Measure = CALCULATE(SUM(Sheet1[Amount]),   
      FILTER(ALLSELECTED(Sheet1),
            Sheet1[Ranking] >= Min(Sheet1[Ranking])
      ) 
)

 

 

How can I avoid this problem and still be able to cumulate values based on the descending column for rating?

 

3 REPLIES 3
Padycosmos
Solution Sage
Solution Sage

Padycosmos_0-1676327852565.png

 

Greg_Deckler
Community Champion
Community Champion

@HerrPowerBI Use your ID instead? If you need an absolute unique ranking, you can use this:

The Mythical DAX Index - Microsoft Power BI Community

Also, see if this helps:



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thank you for your response.

Unfortunately, none of the solutions above worked for me. I know how I can sort it by ID, but the rating is not following the order of ID's. I also have to be able to pick out someones name by using the filter and still be able to cumulate the values of that specific filtered view.

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.

Top Solution Authors