Forum Discussion
how to apply conditional formatting for text values in a table
Hi,
I have a table like below:
I would like to color format the blank values as red. I know how to do this with numeric values but I couldn't find for the text datatype columns.
Thank you.
7 Replies
- AnonymousNot applicableHi,
Try using this DAX for blanks.
Title =VAR Name1 = IF(SELECTEDVALUE('Sheet1'[Column]) = Blank(), True, False)RETURNSWITCH(TRUE(),Name1 , "#CD5C5C")Thanks.- frknklcsln
Helper II
Hi Anonymous , thanks for the response.
Is this a measure or a calculated column?
- frknklcsln
Helper II
Anonymous , second question,
how can I apply this after the dax? can you show me in screenshots?
much appreciated
- AnonymousNot applicable
Hi frknklcsln,
For a selected column--open conditional formatting-- background color--then select field value--apply measure.
Thanks.
- frknklcsln
Helper II
Thats not working. I cannot select the measure for the What field should we based this on? area.
- AnonymousNot applicable
Hi frknklcsln ,
What format your measure is, only when it is text format, you can choose, if it is integer, you can't put it in.
Text = IF( MAX('Table'[ABC])= BLANK(),"yellow","red")integer = IF( MAX('Table'[ABC])= BLANK(),1,0)Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.