Forum Discussion

jcastr02's avatar
jcastr02
Post Prodigy
4 years ago

Conditional Formatting Yes or No; with Text Column

How to add conditional formatting to a matrix when the value is No (color it light red)?  The column where this is pulling from is a TExt column so I only see ability to do conditional formatting is a value(number)  - any help is appreciated.

 

6 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  

      Create a measure based on your text column and use that for conditional format.

     

    Ex:

    m_automated_fill = IF(MAX('Table1'[Automated_Fill])="Yes" , 1 , 2 )

     

    Then , in condiotion format , format the text column based on this measure. Green if its 1(Yes), and red if its 2 (No).

     

    Hope this helps.

     

    Thanks
    Raj

    • jcastr02's avatar
      jcastr02
      Post Prodigy

      Hello Anonymous I created the measure and set cond. formatting as below but nothing is occuring any ideas on what I'm doing wrong?

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi jcastr02 ,

    I created a sample pbix file(see attachment), please check whether that is what you want.

    1. Create a measure as below to get the color formatting

    Conditional formatting = IF ( SELECTEDVALUE ( 'Table'[Acknowledged?] ) = "No", "Red" )

    2. Configure conditional formatting just as shown in below screenshot: select the matrix and navigate to Fields pane. Click on the drop-down icon to the right of field Acknowledged and select "Conditional formatting" --> "Background color"

    Best Regards

    • jcastr02's avatar
      jcastr02
      Post Prodigy

      Hi Anonymous  this worked however it only works when I filter for the completed ones, see first screen shot - reds dont' show up but when i filter for N then it works..

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi jcastr02 ,

        Could you please provide some simple sample data in your model(exclude sensitive data) which involved in your matrix visual in order to make troubleshooting? Later I will check why it happen... Thank you.

        Best Regards