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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ianbruckner
Frequent Visitor

Merging with one exact match column and one fuzzy join column

Is it possitble to do a merge based on two columns... one that requires the first column selected to be an exact match, and on a second column with fuzzy join settings applied?

 

I'm trying to merge a dataset that, when there are overlaps, one of the columns should ALWAYS be an exact match (system date)... but the second column I'm matching on is free-form text field. I want to avoid fuzzy matches from that second column matching up to a result when the dates from the first column don't match. I've tried my best to rig it, by making the date field a Long-form text version of date, so the chances of a bad match because both columns are fuzzy matched being low, but I've found it not exact, and playing with the similarity threshold hasn't solved the problem. 

1 ACCEPTED SOLUTION
ImkeF
Community Champion
Community Champion

Hi @ianbruckner ,
I'm afraid, but the merge/join-condition can only be set on the join level and not on column-level.

 

For inner joins, you can simply do them one after another, but for outer joins you have to expand the matched columns and then apply some logic afterwards (taking only those rows, where both expansions returned values).

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

View solution in original post

3 REPLIES 3
LaasyaS
Microsoft Employee
Microsoft Employee

Came across this thread when I had the same issue. 

 

Worked around by creating a separate intermediate mapping table. 
Group/Aggregate both the tables you are trying to compare by only 1 metric - the field that you are trying to fuzzy match. 
Then fuzzy match the 2 grouped tables to give you a conversion table. Play with the similarity etc as needed until you're satisfied with the result. 
Then join the conversion table to the first table to give you the field needed from the second table. 

 

Now you can do an exact match between the first and second table on both fields. 

ImkeF
Community Champion
Community Champion

Hi @ianbruckner ,
I'm afraid, but the merge/join-condition can only be set on the join level and not on column-level.

 

For inner joins, you can simply do them one after another, but for outer joins you have to expand the matched columns and then apply some logic afterwards (taking only those rows, where both expansions returned values).

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Thanks, @ImkeF. Your answer of possible or not was helpful... and your solution of double merging is leading me to consider my datasets more closely to see if there might be other similarties I can code against.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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