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
Anonymous
Not applicable

conditional formatting per column

I have a table which shows the number of car crashes for each car within with 3 columns - HIgh, Medium, low.

I want to add conditional formatting to each cell. The conditions are  for the background color to changes depending on the numerical value in the cell. But these thresholds CANT BE the SAME for each column.

Example:

High Column: 0 to 10 = Green Background ; 11 to 20 = Yellow Background ; 22 to 30+ = Red Background

Medium Column: 0 to 20 = Green Background ; 21 to 49 = Yellow Background ; 50+ = red background

 

Is there any way to apply conditional formatting to each column rather than the entire table?

 

thanks guys

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

Please refer to my .pbix file.

v-lionel-msft_0-1616490329675.png

 

Best regards,
Lionel Chen

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

6 REPLIES 6
v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

Try to use the feature.

v-lionel-msft_1-1616132768866.png

 

v-lionel-msft_0-1616132744716.png

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Anonymous
Not applicable

Here is the visual :

crispybacon95_1-1616449760566.png

crispybacon95_2-1616449773293.png

crispybacon95_3-1616449821708.png

 

notice how the columns are an option for conditional formatting? just the values for the table.

 

 

Hi @Anonymous ,

 

Please refer to my .pbix file.

v-lionel-msft_0-1616490329675.png

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi there,

 

Thanks this is very helpful.

 

The issue is that the values are a measure, the columns are high,medium,low. these dont show up as options under the conditional formatting list.

 

Cheers 

amitchandak
Super User
Super User

@Anonymous , You can create a color measure using switch and can use that in conditional formatting using 'Filed value option

Switch( True() ,

max(Table[high]) <=10 , "Green",

max(Table[high]) <=20 , "yellow",

"red"

)

 

Same way you can create other measures or combined measures.

 

refer for steps

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

 

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi there,

 

Thank you for your help.

 

I'm sorry I dont fully understand the process as explained above. Could you provide more detail? What do i do once I have created a measure with the above DAX code? 

 

Cheers 

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.