Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Need help conditional formatting True/False values in a column with other different values.

Hi Power BI Community,

 

I'm trying to conditionally format this table that has True/False values as well as numbers. I would like True to be highlighted in Green and False be red...while the remaining values remain neutral. Please see the image and let me know if I can provide any addtional information.

 

Thanks!

  • Hi Anonymous,

     

    Sorry, please try this.

    The measure is to apply condition format as:

    Could you provide details about your issue?

     

    Best Regards,

    Link

     

7 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    Anonymous Seems like that would have to be a text column so just use Conditional Formatting Rules where if the text equals "TRUE", green, "FALSE", red or otherwise black?

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hey Greg, thanks for getting back to me! This may be obvious, but it's only allowing me conditionally format based on numeric values and don't know where to find the text option.

  • v-xulin-mstf's avatar
    v-xulin-mstf
    Icon for Community Support rankCommunity Support

    Hi Anonymous,

     

    You need a measure as below:

     

    Measure = SELECTEDVALUE( 'Table'[Column1] ) + 0

     

    Then in  the table visual, right click on the column field>choose conditional formatting>Background color:

    Then make the setting as below:

    And you will see:

    Here is the demo, please try it.

     

    Best Regards,

    Link

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi v-xulin-mstf, I was able to create the measure. However when I go to apply it to the column, I get the error that I "cannot convert value 'FALSE' of type Text to type Number. Is there another work around for this?

       

      Also I tried to click through to the demo but it states that I do not have access to the sharepoint. 

       

      Thank you!

      • v-xulin-mstf's avatar
        v-xulin-mstf
        Icon for Community Support rankCommunity Support

        Hi Anonymous,

         

        Sorry, please try this.

        The measure is to apply condition format as:

        Could you provide details about your issue?

         

        Best Regards,

        Link