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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Camstr
Helper I
Helper I

Highlight where text data is not matching

Hello,

Please see attached screenshot.

I'd like to compare text from two different data sources and conditionally format to highlight where data does not match exactly.

I would prefer not to introduce an additional column.

How would I do this?

 

Screenshot 2024-11-22 145156.jpg

2 ACCEPTED SOLUTIONS

Hi @Camstr

 

You don't need to add a new column to the visual, you just need to use the measure on the conditional formatting of one of the tt columns or on both. Select the measure on the conditional formatting rules.and set the value equal to 1


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

Hi @Camstr  try the following code..

 

Registration check =IF( SELECTEDVALUE (Table[Registration Number 2]) <>BLANK() & & SELECTEDVALUE (Table[Registration Number 1]) <> SELECTEDVALUE (Table[Registration Number 2]), 1)

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

6 REPLIES 6
Camstr
Helper I
Helper I

@MFelix if 'Registration Number 2' is blank then I do not want it to record a mismatch (i.e. 1).  How would I edit the measure to ignore blanks?  Thanks in advance.

Registration Check = IF(SELECTEDVALUE(Table[Registration Number 1]) <> SELECTEDVALUE(Table[Registration Number 2]), 1)

 

Hi @Camstr  try the following code..

 

Registration check =IF( SELECTEDVALUE (Table[Registration Number 2]) <>BLANK() & & SELECTEDVALUE (Table[Registration Number 1]) <> SELECTEDVALUE (Table[Registration Number 2]), 1)

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Camstr
Helper I
Helper I

Hi @MFelix got it now as you suggest.  Thanks!

MFelix
Super User
Super User

Hi @Camstr ,

 

Is the information stored in the same table or are you having the data in different tables? how is the information related?

 

If you have any kind of relationship between both of them and you are using it in a visual you can add a measure similar to this:

Registration Check = IF(SELECTEDVALUE(Table[Registration Number 1]) <> SELECTEDVALUE(Table[Registration Number 2]), 1)

Now add a condittional formatting rule were this measure equals 1 to get the background or text in a red or other colour. 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi Miguel, that's awesome thank you!

The data is stored in different tables and is related through another common identifier.

Your solution works nicely, but it does mean an extra column in my table (for the measure).

I guess that is unavoidable in PBI for text?

 

Cam

Hi @Camstr

 

You don't need to add a new column to the visual, you just need to use the measure on the conditional formatting of one of the tt columns or on both. Select the measure on the conditional formatting rules.and set the value equal to 1


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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