Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi Experts,
I have a requirement to implement color coding in table metrics based on 50% percentile. (below pic from excel)
Result in Excel:
Same conditional formatting I want to implement in powerbi but not able to make it. I have tried below in Powerbi not desired output is not coming because I am using 50 percent not the percentile. I am not aware how to calculate percentile in powerbi.
PowerBI Implementation by me:
Kindly help me how can I achieve this . Thank you
Solved! Go to Solution.
thanks @Bibiano_Geraldo for the solution but unfortunately is not working in my case because I have do not have direct column to use in formula. there is already measure created from multiple measures so giving incorrect result for me.
thanks @Bibiano_Geraldo for the solution but unfortunately is not working in my case because I have do not have direct column to use in formula. there is already measure created from multiple measures so giving incorrect result for me.
Hi @bhuprakashs ,
Power BI has a built-in function called PERCENTILEX.INC, which calculates percentiles. For the 50th percentile (median), you can create a measure like this:
Percentile 50 =
PERCENTILEX.INC(
ALL('Table'[Column]), -- Replace 'Table' and 'Column' with your table and column names
'Table'[Column], -- The column you want the percentile of
0.5 -- 50% percentile (for the median)
)
Now that you have the 50th percentile, you can use it to create a measure for conditional formatting. For example:
Color Code Measure =
VAR MedianValue = [Percentile 50]
VAR CurrentValue = SUM('Table'[Column]) -- Replace with your metric column
RETURN
IF(CurrentValue < MedianValue, 1,
IF(CurrentValue = MedianValue, 2, 3))
1 could represent a value below the median (you can assign a color like red).
2 could represent a value equal to the median (use a neutral color like yellow).
3 could represent a value above the median (you can assign a color like green).
This way, you'll achieve a similar color coding in Power BI as you had in Excel based on the 50th percentile.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 54 | |
| 51 | |
| 39 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 93 | |
| 79 | |
| 37 | |
| 27 | |
| 25 |