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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
JUANROVALETTI
Frequent Visitor

Conditional formating with ranks

hi i need some help with this:
i would like to apply a conditional format in my bars , like a top 5 with another colour.

But consider that i applied parameter fields for each axis so i want that no matter what the user select always the top five columns come with a different colour

bellow the details

JUANROVALETTI_1-1691605013080.png

 


i have 2 parameter fields.
Parameter 1 = i have values, specifically i have total spend and the count of purchase orders, i use it in the X-axis
parameter 2 = i have categories or data that i use in the Y-axis, like supplier, buyer or area ( they are diferent topics that came from the same table but not hierarqy)

i created for each combination a ranking, probably it would be usefull 
here an example i have de NRO_SOLICITANTE

one column for the count of OC-LINES then the ranking considering that measure

one column for the count of gasto total(total spend) then the ranking considering that measure

 

JUANROVALETTI_0-1691604938497.png

 

2 REPLIES 2
JUANROVALETTI
Frequent Visitor

okey. But the problem is that in the first visual i have a parameter for each axis.
So i can't define de rank to only one measure i would like a measure that depending on what i select take one of my ranking that i made for each combination and do a conditional formating with colours

 


X-AXIS

JUANROVALETTI_1-1691664931083.png

 

Y-AXIS

JUANROVALETTI_0-1691664883149.png

 

amitchandak
Super User
Super User

@JUANROVALETTI , Create a rank like

 

Rank= Rankx(allselected(Table[NRO_NECESIDA]), [OC-LINES])

 

Then create a measure like

Switch(True(),

[Rank]<5= "Green", "Blue")

 

and use in conditional formatting using field value option

 

you can also consider new rownumber

 

Power BI - New DAX Function: Rownumber- https://www.youtube.com/watch?v=yS9-IQjUDwg&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L&index=1

 

How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/...
https://amitchandak.medium.com/power-bi-where-is-the-conditional-formatting-option-in-new-format-pan...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.

Top Solution Authors