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

Join 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.

Reply
Anish7117
New Member

How to I enable conditional formatting on a Power BI ribbon chart?

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:

 

SampleImage.jpg

 

 

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

2 ACCEPTED SOLUTIONS
mark_endicott
Super User
Super User

@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. 

View solution in original post

Anonymous
Not applicable

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.

vrzhoumsft_0-1725008880355.png

vrzhoumsft_1-1725008900297.png

Result is as below.

vrzhoumsft_2-1725008941077.png

 

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.

 

 

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

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.

vrzhoumsft_0-1725008880355.png

vrzhoumsft_1-1725008900297.png

Result is as below.

vrzhoumsft_2-1725008941077.png

 

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.

 

 

 

mark_endicott
Super User
Super User

@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. 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.