cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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!:
Mastering Power BI 2nd Edition

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors