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
JChouris
Helper I
Helper I

Color Coding Specific data in a Matrix.

I have a matrix and need certain things to come with a color background. I am fairly new to BI and conditional formatting is not my strong suit. Any help would be greatly appreciated. Example. ESC should be Gray, ACC should be Blue etc. Thank you in advance for any help.

 

table.JPG

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @JChouris ,

According to your description, here's my solution, create a measure.

Color =
SWITCH ( MAX ( 'Table'[Resets] ), "ESC", "Gray", "ACC", "Blue" )

In the visual formatting pane>Visual>Cell elements, turn on the Backgroud color option, and select fx button.

vkalyjmsft_0-1661938403589.png

Select the color measure in the field.

vkalyjmsft_2-1661938555887.png

Ge the correct result.

vkalyjmsft_3-1661938687231.png

More information about conditional formatting, you can refer to this documnet: 

Apply conditional table formatting in Power BI - Power BI | Microsoft Docs

 

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

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

10 REPLIES 10
v-yanjiang-msft
Community Support
Community Support

Hi @JChouris ,

According to your description, here's my solution, create a measure.

Color =
SWITCH ( MAX ( 'Table'[Resets] ), "ESC", "Gray", "ACC", "Blue" )

In the visual formatting pane>Visual>Cell elements, turn on the Backgroud color option, and select fx button.

vkalyjmsft_0-1661938403589.png

Select the color measure in the field.

vkalyjmsft_2-1661938555887.png

Ge the correct result.

vkalyjmsft_3-1661938687231.png

More information about conditional formatting, you can refer to this documnet: 

Apply conditional table formatting in Power BI - Power BI | Microsoft Docs

 

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

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

 

It works great .Thank you so much.

JChouris
Helper I
Helper I

Here is a sample of the table i draw these specs from.

 

ResetsReset IDDescription
ESC1Electronic Stability Control - Optional Feature - Reset Required if present. Use OEM scan tool (No Codelink Support Yet)
ESC*2Electronic Stability Control - Reset Required - Standard Feature. Use OEM scan tool (No CL Support Yet)
ESC►3Electronic Stability Control - Optional Feature - Reset Required if present. Use CodeLink or OEM scan tool 
ESC→4Electronic Stability Control - Reset Required - Standard Feature. Use CodeLink or OEM scan tool
EPS5Electronic Power Steering - Optional Feature - Reset Required if present. Use OEM scan tool (No Codelink Support Yet)
EPS*6Electronic Power Steering - Reset Required - Standard Feature. Use OEM scan tool (No CL Support Yet)
EPS►7Electronic Power Steering - Optional Feature - Reset Required if present. Use CodeLink or OEM scan tool 
EPS→8Electronic Power Steering - Reset Required - Standard Feature. Use CodeLink or OEM scan tool
ACC9Adaptice Cruise Control - Optional Feature - Reset Required if present. Use OEM scan tool (No Codelink Support Yet)
ACC*10Adaptice Cruise Control - Reset Required - Standard Feature. Use OEM scan tool (No CL Support Yet)
ACC►11Adaptice Cruise Control - Optional Feature - Reset Required if present. Use CodeLink or OEM scan tool 
ACC→12Adaptice Cruise Control - Reset Required - Standard Feature. Use CodeLink or OEM scan tool
AEB13Automatic Emergency Braking - Optional Feature - Reset Required if present. Use OEM scan tool (No Codelink Support Yet)
AEB*14Automatic Emergency Braking - Reset Required - Standard Feature. Use OEM scan tool (No CL Support Yet)
AEB►15Automatic Emergency Braking - Optional Feature - Reset Required if present. Use CodeLink or OEM scan tool 
AEB→16Automatic Emergency Braking - Reset Required - Standard Feature. Use CodeLink or OEM scan tool
EPS³17Electronic Power Steering - Reset Required - Standard Feature Use CodeLink or OEM Scan Tool
EPS³☼18Electronic Power Steering - Reset Required - Standard Feature Use CodeLink or OEM Scan Tool (Requires CodeLink OEM expansion cable)
EPS³►19Electronic Power Steering - Reset Required - Standard Feature Use CodeLink or OEM Scan Tool
EPS³☼20Electronic Power Steering - Reset Required - Standard Feature. Use CodeLink or OEM scan tool
JChouris
Helper I
Helper I

This is the database i draw from. Each Reset needs a color coding. Just unsure how to conditional format these as they are not numerical values. I need them to show up colored Capture.JPG

Easiest would be to create a reference table with each Reset value and the color name of the color you want to assign to that Reset.  Tie that table into the data model and then use the color field for the formatting  - use any aggregation your want, for example max([color])

Not really sure how to go about doing that. Sorry still really new to this and might have bitten off more than i can chew with this project.

Each Reset needs a color coding

Can you provide a couple of examples which Reset needs which color?

Please provide sanitized sample data that fully covers your issue. I can only help you with meaningful sample data.
Please paste the data into a table in your post or use one of the file services like OneDrive or Google Drive.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...

Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

JChouris
Helper I
Helper I

I tried conditional formating but it seems to only allow for numerical formating. I need to color format the terms in the cells.

lbendlin
Super User
Super User

What have you tried and where are you stuck?

 

Please provide sanitized sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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 Kudoed Authors