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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Conditional formatting - top 3 clustered column chart

Hello all,

 

I'm trying to get a top 3 clustered column chart where I can conditional format the following:

#1: color gold

#2: color silver

#3: color bronz 

CamilleKeC_0-1655284115011.png

 

The data is as followed:

AreaSales
Midden170
Noord169
Zuid140
Oost120
West40

 

I've tried to do this with a switch measure in the "Format your visual" panel under "Columns colors", but that did not seem to work.

 

Is this possible to do?

 

Thanks in advance! 

1 ACCEPTED SOLUTION
johncolley
Solution Sage
Solution Sage

Hi @Anonymous ,

 

The switch statement is the way to go, but need a rank column to make it work. 

 

This thread details a few ways to go about ranking: https://community.powerbi.com/t5/Desktop/Ranking-a-column-in-a-table/td-p/1436672 

 

I followed the index column within power query and called it 'Descending Rank' and then used the following measures:

Rank = SELECTEDVALUE('Top 3'[Descending Rank])

 

Colouringtop3 = 
var firstplace = [Rank] = 1
var secondplace = [Rank] = 2
var thirdplace = [Rank] = 3
var result = SWITCH(
TRUE(),
firstplace, "Gold",
secondplace, "Silver",
thirdplace, "Brown", "Black")
return
result

 

johncolley_0-1655362964133.png

I hope this solves your problem and if it does please mark it as a solution!

 

View solution in original post

1 REPLY 1
johncolley
Solution Sage
Solution Sage

Hi @Anonymous ,

 

The switch statement is the way to go, but need a rank column to make it work. 

 

This thread details a few ways to go about ranking: https://community.powerbi.com/t5/Desktop/Ranking-a-column-in-a-table/td-p/1436672 

 

I followed the index column within power query and called it 'Descending Rank' and then used the following measures:

Rank = SELECTEDVALUE('Top 3'[Descending Rank])

 

Colouringtop3 = 
var firstplace = [Rank] = 1
var secondplace = [Rank] = 2
var thirdplace = [Rank] = 3
var result = SWITCH(
TRUE(),
firstplace, "Gold",
secondplace, "Silver",
thirdplace, "Brown", "Black")
return
result

 

johncolley_0-1655362964133.png

I hope this solves your problem and if it does please mark it as a solution!

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.