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
ilhamfadhillah4
New Member

Calculate percentile with filters

Hi everyone,

 

So I have a problem with calculating percentiles filtered based on the value of another column, here's an example:

ilhamfadhillah4_0-1678947825804.png

The data that I have is in the left table, I want to add the 'Percentile' column in the same table containing the percentile value of the total budget in the account for that row, so the end result should be like the one in the right. My current formula is as follows:

PERCENTILE = PERCENTILE.EXC(Table[Budget],0.8)

Which returns overall percentile of the data instead of it being the percentile of each account. I tried the following formula as well:

PERCENTILE = CALCULATE(PERCENTILE.EXC(Table[Budget],0.8),Table[Account])

 Which returns an error because the filter expression returns a string value and cannot be converted into a true/false.

How do I make sure that the percentile value in each row is specific to the percentile value for the account in that row? So any row with the same account will return the same value. Thanks in advance!

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

PERCENTILE = CALCULATE(PERCENTILE.EXC(Table[Budget],0.8),ALLEXCEPT(Table,Table[Account]))

this would be one option, but it's a rather blunt instrument. You may need to use different filter context manipulations.

View solution in original post

2 REPLIES 2
ilhamfadhillah4
New Member

I just tried that and it works, thank you so much!

lbendlin
Super User
Super User

PERCENTILE = CALCULATE(PERCENTILE.EXC(Table[Budget],0.8),ALLEXCEPT(Table,Table[Account]))

this would be one option, but it's a rather blunt instrument. You may need to use different filter context manipulations.

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.