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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
geleigh
Frequent Visitor

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.

 

PowerBISample.PNG

Thanks!

1 ACCEPTED SOLUTION

Hi @geleigh,

 

Sorry, please try this.

The measure is to apply condition format as:

v-xulin-mstf_0-1615254434001.png

Could you provide details about your issue?

 

Best Regards,

Link

 

View solution in original post

7 REPLIES 7
v-xulin-mstf
Community Support
Community Support

Hi @geleigh,

 

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:

Annotation 2020-04-08 153326.png

Then make the setting as below:

Annotation 2020-04-08 153501.png

And you will see:

Annotation 2020-04-08 153559.png

Here is the demo, please try it.

 

Best Regards,

Link

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!

Hi @geleigh,

 

Sorry, please try this.

The measure is to apply condition format as:

v-xulin-mstf_0-1615254434001.png

Could you provide details about your issue?

 

Best Regards,

Link

 

Thank you! It finally worked. I need to change the data type. 

PhilipTreacy
Super User
Super User

@Greg_Deckler 

Hi Greg, OP has replied but not tagged you.

regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Greg_Deckler
Super User
Super User

@geleigh 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?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.