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
dbldee5
Frequent Visitor

Conditional formatting

If I can get any help with this, it would be awesome. I have a table that has 3 text columns in the rows:

Course

Modality

Part of term

 

I want to add a conditional format of Red to the Course Row if it is a certain percent filled

I want to add a conditional format of Yellow to the Modality row if it is a certain percent filled

I want to add a conditional format of Green to the Part of Term row if it is a certain percent filled

 

 

dbldee5_0-1723739115659.png

 

1 ACCEPTED SOLUTION

Hi Sam

WOW!! this is perfect and worked!!

one more question. This is what the table looks like now.. is there a way to add the same color to the column with the words? on the Course, part of Term and Modality

 

dbldee5_0-1723812163224.png

 

 

View solution in original post

4 REPLIES 4
SamWiseOwl
Super User
Super User

Hi @dbldee5  you could do this with a SWITCH and ISFILTERED:
colour measure =
Switch(
true()
,isFiltered(table[Term]) && [Percent] > X,"Green"
,isFiltered(table[Modality]) && [Percent] > X ,"Yellow"
,isFiltered(table[Course]) && [Percent] > X ,"Red")

 

You test the inner most row first and then work outwards.


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

Hi Sam

WOW!! this is perfect and worked!!

one more question. This is what the table looks like now.. is there a way to add the same color to the column with the words? on the Course, part of Term and Modality

 

dbldee5_0-1723812163224.png

 

 

I don't believe so sadly 😞


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

Hi Sam, 

I accepted this as a solution. Do you know if I will be able to color the first column with the labels the same way?

Thanks

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.