Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have a PowerBI project where I am using a ribbon chart.
The X- axis field contains the subjects (English, Science and Mathematics)
The Y-axis field contains the average scores
The Legend field contains the Name of Students
I have attached a sample Image:
What I want to implement is, I want to include a slicer where if I select the name of a Student, the color of the corresponding student ribbon turns to red, else it remains grey.
Power BI is not allowing me to apply conditional formatting and therefore, I am forced to use the manual color selection for every ribbon. How can I achieve the functionality?
Thanks
Solved! Go to Solution.
@Anish7117 - There is no easy way to do this in Power BI, but it is possible with a workaround.
Most of the technique for this is shown in the video linked here: https://www.youtube.com/watch?v=_GOIflxSlYI
However, I would not suggest you use two visuals for this, I would suggest you put both measures in the same chart so that the one you wish to colour is on top of the grey ribbons. There is a bit more about this process here: https://www.youtube.com/watch?v=rldduQrW83Q - But again, you will not need to use this whole process, this will just be showing you how to add multiple measures.
Both videos are for a line chart, but it will also work for a Ribbon chart.
If these ideas work for you, please accept this as a solution. It helps with visibility for others with the same challenge.
Hi @Anish7117 ,
As far as I know, if you add column into Legend of visual, Power BI will give the color based on the Legend automaticlly. This is by desgin.
If you still want to change the color dynamiclly, I suggest that you can add student into small multiple or X aixs instead of Legend.
Create an unrelated Student Table.
DimStudent =
VALUES('Table'[Student])
Measure:
Measure =
IF(ISFILTERED('Table 2'[Student]),IF(MAX('Table'[Student]) in VALUES('Table 2'[Student]),"Red","Gray"),"Gray")
Add this measure into columns color.
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anish7117 ,
As far as I know, if you add column into Legend of visual, Power BI will give the color based on the Legend automaticlly. This is by desgin.
If you still want to change the color dynamiclly, I suggest that you can add student into small multiple or X aixs instead of Legend.
Create an unrelated Student Table.
DimStudent =
VALUES('Table'[Student])
Measure:
Measure =
IF(ISFILTERED('Table 2'[Student]),IF(MAX('Table'[Student]) in VALUES('Table 2'[Student]),"Red","Gray"),"Gray")
Add this measure into columns color.
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anish7117 - There is no easy way to do this in Power BI, but it is possible with a workaround.
Most of the technique for this is shown in the video linked here: https://www.youtube.com/watch?v=_GOIflxSlYI
However, I would not suggest you use two visuals for this, I would suggest you put both measures in the same chart so that the one you wish to colour is on top of the grey ribbons. There is a bit more about this process here: https://www.youtube.com/watch?v=rldduQrW83Q - But again, you will not need to use this whole process, this will just be showing you how to add multiple measures.
Both videos are for a line chart, but it will also work for a Ribbon chart.
If these ideas work for you, please accept this as a solution. It helps with visibility for others with the same challenge.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
9 | |
8 | |
8 | |
8 |
User | Count |
---|---|
13 | |
12 | |
11 | |
10 | |
9 |