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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
The data is as followed:
| Area | Sales |
| Midden | 170 |
| Noord | 169 |
| Zuid | 140 |
| Oost | 120 |
| West | 40 |
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!
Solved! Go to Solution.
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
I hope this solves your problem and if it does please mark it as a solution!
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
I hope this solves your problem and if it does please mark it as a solution!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |