Forum Discussion

JChouris's avatar
JChouris
Helper I
4 years ago
Solved

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.

 

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

    Select the color measure in the field.

    Ge the correct result.

    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.

     

10 Replies

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

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

  • 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

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

    Select the color measure in the field.

    Ge the correct result.

    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.