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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
StuartSmith
Power Participant
Power Participant

Card Visual - Text Colour based on card content.

Is it possible to get a "Card Visual" text colour to display red if the content contains the word "Closed".  

 

I have looked at conditional formatting, but that only seems to be based on numerical values and not test.   

 

 

2019-09-27_11-43-29.png

1 ACCEPTED SOLUTION
v-lid-msft
Community Support
Community Support

Hi @StuartSmith ,

 

We can use a color measure and condition format to meet your requirement:

 

1. Create a measure to show color:

FontColor = IF(CONTAINSSTRING([AddressToShowMeasure],"Closed"),"#FF0000","#000000")

Change the [AddressToShowMeasure] to the measure which you used in card visual.

 

2. Set the condition format for card visual:

1.PNG2.PNG3.PNG

 

3. Then you can make the card visualdisplay red if the content contains the word "Closed"

4.PNG5.PNG

 

 

 

BTW, pbix as attached.

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-lid-msft
Community Support
Community Support

Hi @StuartSmith ,

 

We can use a color measure and condition format to meet your requirement:

 

1. Create a measure to show color:

FontColor = IF(CONTAINSSTRING([AddressToShowMeasure],"Closed"),"#FF0000","#000000")

Change the [AddressToShowMeasure] to the measure which you used in card visual.

 

2. Set the condition format for card visual:

1.PNG2.PNG3.PNG

 

3. Then you can make the card visualdisplay red if the content contains the word "Closed"

4.PNG5.PNG

 

 

 

BTW, pbix as attached.

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you, this helped me, too!

Thank you so much, been searching high and low for this. Was able to change background of my Card colour based on text value of the measure.

That worked great and what I was trying to do, but was unsure how to do it.

amitchandak
Super User
Super User

Please check

https://community.powerbi.com/t5/Desktop/Conditional-Formatting-Card/td-p/113916

https://insightsquest.com/2018/05/06/conditional-formatting-for-card-visuals/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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