Forum Discussion
Getting certain text to show in Red
I'm wanting the text (Letter Waived) to show in RED.
I've gone to the Column name Description and went to Conditional formating and choose font color.
But all options have to do with Vaules and counting. not with the Text.
How to I get the Text or even the background of that text box to show a different color?
- Anonymous3 years ago
Hi inglexjc
You can use CONTAINSSTRING() function
e.g
Measure 4 = IF(CONTAINSSTRING(SELECTEDVALUE('Table'[Description]),"Letter Waived"),"red","white")Then put it to the conditional formatting
Output
Please refer to the following link to know more about CONTAINSSTRING() function:
CONTAINSSTRING function (DAX) - DAX | Microsoft Learn
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- AnonymousNot applicable
Hi inglexjc
You can use CONTAINSSTRING() function
e.g
Measure 4 = IF(CONTAINSSTRING(SELECTEDVALUE('Table'[Description]),"Letter Waived"),"red","white")Then put it to the conditional formatting
Output
Please refer to the following link to know more about CONTAINSSTRING() function:
CONTAINSSTRING function (DAX) - DAX | Microsoft Learn
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- vicky_Super User
You will need to create a measure for your description (maybe use CONTAINSSTRING as the filter condition?), and then use that to format your table. This article on RADCAD should be a good starting point: https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
- inglexjcPost Patron
Okay but reading the article shows numbers not text, how do I get the text to be a different color?