Forum Discussion

Sharkybu's avatar
Sharkybu
Helper II
1 year ago
Solved

Fuzzy match gives different results on the same data

Hello,   I'm trying to compare between two tables that contain names of people and I'm using fuzzy match to find people in both tables. When I ran it the first time I got a match between "John, Sm...
  • BeaBF's avatar
    BeaBF
    1 year ago

    Sharkybu with fuzzy mtaching also an extra space can change the result. Try to do a Trim on both the columns and re-try with the fuzzy matching.

     

    BBF


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

    👍 Kudos are appreciated

    🔥 Proud to be a Super User!

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Sharkybu ,

    Thank you for reaching out to the Microsoft Fabric Community. Also thank you BeaBF  for your input.

     

    Fuzzy matching can be sensitive to even minor changes like extra spaces, hidden characters, or case differences these can cause previously successful matches to fail after a refresh.

     

    To resolve this, please apply the following steps in Power Query for both tables before performing the fuzzy merge:

    = Table.TransformColumns(YourTable, {{"Name", each Text.Lower(Text.Trim(Text.Clean(_)))}})

    This ensures the data is clean, trimmed, and case-normalized, improving match consistency. Also, consider slightly lowering the similarity threshold if needed.

     

    If this post helps, then please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.

     

    Thankyou.

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hello Sharkybu ,

     

    Thanks for the update and for testing the suggestions. Power BI's fuzzy matching is useful but can sometimes give different results even when your data hasn’t changed. This happens because the matching logic depends on how the names are broken into parts (called tokens), and small changes behind the scenes like the order of rows or internal updates during a refresh can affect the results.

     

    In your example, matching "John, Smith" with "Smith, J." is tricky because it involves recognizing initials and name order, which can be unreliable across refreshes. When you lowered the similarity to 0.5, the match reappeared, but that also caused many incorrect matches to show up.

     

    To fix this, I recommend creating a new column in both tables that formats the names in a consistent way like combining the last name with the first initial (for example, "Smith J"). This makes the matching clearer and lets you use a better similarity setting (like 0.7) to get more accurate results.

     

    If this post helps, then please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.

     

    Thankyou.