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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
frknklcsln
Helper II
Helper II

how to apply conditional formatting for text values in a table

Hi,

 

I have a table like below:

 

frknklcsln_0-1667564787407.png

 

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 7
Anonymous
Not 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")

 

vyangliumsft_0-1669169245596.png

vyangliumsft_1-1669169245596.png

integer =
IF(
MAX('Table'[ABC])= BLANK(),1,0)

vyangliumsft_2-1669169245597.png

 

 

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.

Anonymous
Not applicable

Hi @frknklcsln,

For a selected column--open conditional formatting-- background color--then select field value--apply measure.

SanikaT_0-1667795292434.png

 

Thanks.

Thats not working. I cannot select the measure for the What field should we based this on? area.

 

frknklcsln_0-1667990209290.png

 

Anonymous
Not applicable

Hi,
Try using this DAX  for blanks.

Title =
VAR Name1 = IF(SELECTEDVALUE('Sheet1'[Column]) = Blank(), True, False)
RETURN
SWITCH(
TRUE(),
Name1 , "#CD5C5C")
 
Thanks.

Hi @Anonymous , thanks for the response.

 

Is this a measure or a calculated column?

Anonymous
Not applicable

Hi @frknklcsln it is a measure

@Anonymous , second question,

 

how can I apply this after the dax? can you show me in screenshots?

 

much appreciated

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 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.

Top Solution Authors