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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
PBE
Helper II
Helper II

Table column background based on number in another column

Hi

Help much appreciated.

I have a table where I want the 'Department' column background to change depending on value in 'Background No.' column.

I want this:-

PBE_1-1657288419014.png

to show as below based on the value in the Background No. column.

 

PBE_0-1657288031763.png

I can't get conditional formatting for the 'Department' column to do this.

Thank you

 

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi  @PBE ,

You can create measures to customize colors based on color coding, and set the background color of fields through Conditional formatting.

It is also possible to customize the colors by creating rules directly in Conditional formatting.

Here are the steps you can follow:

1. Select [Department] - Conditional formatting - Background color.

vyangliumsft_0-1657610595839.png

2. Enter the Background color interface.

Format style – Rules

What field should we base this on -- Sum of [Background NO.]

Click +New rule to add information, how many conditions to add how many rules

If value = 1 Number

Then you can customize the color

vyangliumsft_1-1657610595844.png

3. Result:

vyangliumsft_2-1657610595850.png

If you need pbix, please click here.

 

Best Regards,

Liu Yang

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

Thank you Liu

 

That worked well

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi  @PBE ,

You can create measures to customize colors based on color coding, and set the background color of fields through Conditional formatting.

It is also possible to customize the colors by creating rules directly in Conditional formatting.

Here are the steps you can follow:

1. Select [Department] - Conditional formatting - Background color.

vyangliumsft_0-1657610595839.png

2. Enter the Background color interface.

Format style – Rules

What field should we base this on -- Sum of [Background NO.]

Click +New rule to add information, how many conditions to add how many rules

If value = 1 Number

Then you can customize the color

vyangliumsft_1-1657610595844.png

3. Result:

vyangliumsft_2-1657610595850.png

If you need pbix, please click here.

 

Best Regards,

Liu Yang

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

Thank you Liu

 

That worked well

Thanks Liu

 

I will give it a try.

amitchandak
Super User
Super User

@PBE , if this is Matrix, you can not. In the case of table visual, you can create a color measure and use that in conditional formatting using the field value option

 

example

Measure =
Switch(true(),
max(Table[Column]) = "R1" , "Red" ,
max(Table[Column]) = "R2" , "Green" ,
max(Table[Column]) = "R3" , "Pink "
)

 

color Measure =
Switch(True() ,
max(Table[ID]) in {10,20,30} ,"Red",
max(Table[ID]) in {5,15,25} ,"Blue",
"White"
)

 

 

How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you Amitchandak.

I don't understand the measure but will have a go at understanding it.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors