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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Shiji
Regular Visitor

Matching column of names to column of notes

Hi! What is the best way to compare a column of names with a column containing notes? If I were to just match names, I would build a relationship and use fuzzy match. However, since the second column contains sentences/paragraphs, fuzzy matching yields almost no results. Is there a best practice on how to do this? I'm thinking it involves a find/function and loop? Any help would be appreciated! Example columns are provided below.

 

Names
Ashok Kumar
Baby Doe
Brett Boe
Carla Coe
Frank Foe
Jackie Joe
Jane Doe
Jane Poe
Jane Roe
Joe Public
John Doe

 

Notes
Jane Poe had a little lamb
Jake was all business when he wore his clown suit.
A quiet house is nice until you are ordered to stay in it for months.
Writing a list of random sentences is harder than I initially thought it would be.
Best friends are like old tomatoes and shoelaces.
Seek success, but always be prepared for Joe Public.
They improved dramatically once Frank Foe left.
The small white buoys marked the location of hundreds of crab pots.
1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @Shiji ,

You can create a calculated column as below in Names table, please find the details in the attachment.

 

Notes = 
CALCULATE (
    MAX ( 'Notes'[Notes] ),
    FILTER ( 'Notes', CONTAINSSTRING ( 'Notes'[Notes], 'Names'[Names] ) )
)

 

yingyinr_0-1657866285749.png

CONTAINSSTRING

CONTAINSSTRING, CONTAINSSTRINGEXACT – finds text string in another text string (DAX – Power Pivot, P...

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yiruan-msft
Community Support
Community Support

Hi @Shiji ,

You can create a calculated column as below in Names table, please find the details in the attachment.

 

Notes = 
CALCULATE (
    MAX ( 'Notes'[Notes] ),
    FILTER ( 'Notes', CONTAINSSTRING ( 'Notes'[Notes], 'Names'[Names] ) )
)

 

yingyinr_0-1657866285749.png

CONTAINSSTRING

CONTAINSSTRING, CONTAINSSTRINGEXACT – finds text string in another text string (DAX – Power Pivot, P...

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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