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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Comparing string similarity of two columns in different tables

Hello everyone,

 

I have a problem that needs to be solved. I need to be able to compare two columns in two different tables and see if there are similar strings within those two columns. So for example if I would like to compare a list of my friends to the most wanted lists of the FBI, I could do that.

 

So the pseudo code would look something like this:

For name in name_column in myfriends_table:

     Compare the similarities of every name in myfriends[name_column] to the FBI's most wanted list name_column

     return values that have similarities over 40%



Below I have a demonstration for my issue.

 

My Friends

Name

TJ Watt

Minkah Fitz
Juju Smith-Schuster
Big Ben Roeth

 

FBI's Most Wanted

Name
TJ Hatt
Juju Smith-Schuster
Juju Smith
Cam Heyward
Big Ben Roeth

 

Results table

My Friends NameFBI's Most Wanted NameSimilarity

TJ Watt

TJ Hatt83,333%
Juju Smith-SchusterJuju Smith-Schuster100%
Juju Smith-SchusterJuju Smith46,67%
Big Ben RoethBig Ben Roeth100%

 

Is it possible in dax?

 

Kind regards,

 

Jeppe

2 ACCEPTED SOLUTIONS
v-kelly-msft
Community Support
Community Support

Hi  @Anonymous ,

 

You'd better first create a summarized table such as below:

v-kelly-msft_0-1610676098538.png

 

As if you directly compare the characters from 2 tables,the calculation would be created in the table below: 

v-kelly-msft_1-1610676537893.png

 

After you get a summerized table,you could refer to below similar thread to realize what you need.

https://community.phttpsi.com/t5/Deskpowerbipare-t5o-strings-for-similarity/m-p/290062

 

Best Regards,
Kelly

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

View solution in original post

v-kelly-msft
Community Support
Community Support

Don't @jeppevatane,

Have you checked my answer? Is your problem solved?

Saludos
Kelly

Have I answered your question? Mark my position as a solution!

View solution in original post

2 REPLIES 2
v-kelly-msft
Community Support
Community Support

Don't @jeppevatane,

Have you checked my answer? Is your problem solved?

Saludos
Kelly

Have I answered your question? Mark my position as a solution!

v-kelly-msft
Community Support
Community Support

Hi  @Anonymous ,

 

You'd better first create a summarized table such as below:

v-kelly-msft_0-1610676098538.png

 

As if you directly compare the characters from 2 tables,the calculation would be created in the table below: 

v-kelly-msft_1-1610676537893.png

 

After you get a summerized table,you could refer to below similar thread to realize what you need.

https://community.phttpsi.com/t5/Deskpowerbipare-t5o-strings-for-similarity/m-p/290062

 

Best Regards,
Kelly

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors