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
chillpill
Helper I
Helper I

Add percentile group per row as a calculated column with DAX?

I have a list of names and their data. I would like to add a column to show which person is in which grouping. I would like to group by 50%, 40% and 10% if that's posisble. I have tried with PERCENTILE.EXC but I am not getting the expected results. How would I accomplish this? Or would it need to be a measure instead of a calculated column?

 

NameDataPercentile
John Smith| 0.259309605| 25%
Mary Smith| 0.332877138 | 25%
Mark Smith| 0.899507702| 50%
Jerry Smith| 0.805348293| 50%
Danny Smith| 0.267092547| 50%
Marg Smith| 0.272978056| 50%
Able Smith| 0.392131121| 10%
Mike Smith| 0.534344624| 10%
Brert Smith| 0.874071811| 25%
Hanny Smith| 0.872285147| 50%
Mick Smith| 0.508295626| 10%

 

1 ACCEPTED SOLUTION
techies
Super User
Super User

Hi @chillpill please try this

 

Percentile_Group_Measure =
VAR CurrentValue = MAX(Sheet3[Data])
VAR P10 = PERCENTILEX.INC(ALL(Sheet3), Sheet3[Data], 0.90)
VAR P50 = PERCENTILEX.INC(ALL(Sheet3), Sheet3[Data], 0.50)

RETURN
SWITCH(
    TRUE(),
    CurrentValue >= P10, "10%",  
    CurrentValue >= P50, "40%",  
    "50%"  
)
― Power BI | Microsoft Fabric | PL-300 | DP-600 | Blog: medium.com/@cseprs_54978

View solution in original post

6 REPLIES 6
sevenhills
Super User
Super User

If you want it as a calculated column, same like @chillpill solution, you can use this:

Percentile_Group_col = 
VAR CurrentValue = Table3[Data] 
VAR P10 = PERCENTILEX.INC( Table3 , Table3[Data], 0.90)
VAR P50 = PERCENTILEX.INC( Table3 , Table3[Data], 0.50)

RETURN
SWITCH(
    TRUE(),
    CurrentValue >= P10, "10%",  
    CurrentValue >= P50, "40%",  
    "50%"  
)

 

output:

sevenhills_0-1742599527731.png

 

techies
Super User
Super User

Hi @chillpill please try this

 

Percentile_Group_Measure =
VAR CurrentValue = MAX(Sheet3[Data])
VAR P10 = PERCENTILEX.INC(ALL(Sheet3), Sheet3[Data], 0.90)
VAR P50 = PERCENTILEX.INC(ALL(Sheet3), Sheet3[Data], 0.50)

RETURN
SWITCH(
    TRUE(),
    CurrentValue >= P10, "10%",  
    CurrentValue >= P50, "40%",  
    "50%"  
)
― Power BI | Microsoft Fabric | PL-300 | DP-600 | Blog: medium.com/@cseprs_54978

Is this a calculated column or applied as a measure?

measure

― Power BI | Microsoft Fabric | PL-300 | DP-600 | Blog: medium.com/@cseprs_54978

Wonderful, thank you! If I wanted to have the measure dynamically update based on a slicer/filter - how would that be possible? I removed the ALL() function from your measure but that didn't change anything.

replace ALL with ALLSELECTED

― Power BI | Microsoft Fabric | PL-300 | DP-600 | Blog: medium.com/@cseprs_54978

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.