Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Fuzzy Match Score Wrong

I'm seeing something wrong with the fuzzy match scoring on some of the matches and hoping someone can help me understand why this is occuring.  I have two tables.  My first table called "AS Employee ...
  • Vijay_A_Verma's avatar
    4 years ago

    Actually documentation is clear that "The best scenario for applying the fuzzy match algorithm is when all text strings in a column contain only the strings that need to be compared and no extra components. For example, comparing Apples against 4ppl3s yields higher similarity scores than comparing Apples to My favorite fruit, by far, is Apples. I simply love them!. Because the word Apples in the second string is only a small part of the whole text string, that comparison yields a lower similarity score."

    https://docs.microsoft.com/en-us/power-query/fuzzy-matching

    Hence, to get the right match, you need to have a single word. Hence, you need to match SayersJohn not Sayers, John.

    Just have one intermediate step. In first table i.e. where you want match insert one more column which should have following formula (please replace Name with your column name)

    = Text.Replace([Name],", ","")

     Now, you should perform fuzzy matching on this column to get right result. (You need not make this change in lookup table).

    After fuzzy matching, you can delete this column from your result table.

  • Vijay_A_Verma's avatar
    Vijay_A_Verma
    4 years ago

    Problem is that you applied the formula on both the columns. I specifically wrote this that you need to apply this only in source column. You are supposed to apply this formula only in AssetSteward Leader Name column. Don't apply this formula on Emp Name column.

    Then you would get right result.

    I have demonstrated this in this file where I have shown merge as you were originally doing, then merge where I applied the formula on both source and target columns and merge where I applied the formula on source column only - https://1drv.ms/u/s!Akd5y6ruJhvhuW0f_3h5TxwnKmX7?e=JzLdWS