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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
mjgenesis
Frequent Visitor

cumulative sum based on a percentile calculation

This seems extremely easy, but I can't for the life of me figure it out.  I have a table of values with a DAX calculated column containing an amount and I'm trying to get the cumulative sum of those amounts less than or equal to <= a Percentile.INC measure (called IQR3) already calculated for the group of records.  This cumulative sum total will change (as will the percentile) if filters/slicers are used on the data, ideally.  The two formulas I've tried below only give the full cumulative total, not the total of amounts less than or equal to the IQR3 value.:

 

CUMUL_SUM_HRC =
CALCULATE (
    SUM(Table1[Amount]),
    FILTER(ALL(Table1),Table1[Amount] <= [IQR3]))
 
and.... 
 
CUMUL_SUM_HRC = SUMX(FILTER(Table1,Table1[Amount] <= [IQR3]),Table1[Amount])
 
Any help is greatly appreciated. Not sure where I'm going wrong. Thanks in advance
1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@mjgenesis Try:

CUMUL_SUM_HRC =
  VAR __IQR3 = [IQR3]
  VAR __Result = SUMX(FILTER('Table1', 'Table1'[Amount] <= __IRQ3), 'Table1'[Amount])
RETURN
  __Result

If that doesn't work, paste some sample data.



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...

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@mjgenesis Try:

CUMUL_SUM_HRC =
  VAR __IQR3 = [IQR3]
  VAR __Result = SUMX(FILTER('Table1', 'Table1'[Amount] <= __IRQ3), 'Table1'[Amount])
RETURN
  __Result

If that doesn't work, paste some sample data.



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...

This worked.  Thanks so much for the help.  If it isn't too much trouble could you sum up why the formulas I was trying weren't working?  I'm guessing the dynamic changing nature of the IQR and Amount variable requires a fixed use as a variable?  Really appreciate it.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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