Forum Discussion

keenanto's avatar
keenanto
Regular Visitor
3 years ago

Combined Exact and Fuzzy Matching

DataSet A

 

DataSet B

 

Hi

I have two datasets A & B which I am trying to match on a number of columns (Entityid, EmailSubject, EmailFrom) in order to reconcile or identify differences in another column (Price).

                                                                                                                                                                                             

I need to first create an exact match on the Entityid Column but because there are slight differences in the EmailSubject and EmailFrom columns, I need to create a fuzzy match on the EmailSubject and Email From columns. If this criteria is met, I need to return the price value from dataset B.

 

From creating a merge on the tables I have the queries below - the first which is an exact match or join and the second which is a fuzzy/approximate. However, I do not know how to combine both queries to get what I am looking for.

 

= Table.NestedJoin(#"Changed Type", {"EntityId"}, CMA, {"EntityId"}, "CMA", JoinKind.LeftOuter)

 

= Table.FuzzyNestedJoin(#"Changed Type", {"EmailSubject", "EmailFrom"}, CMA, {"EmailSubject", "EmailFrom"}, "CMA", JoinKind.LeftOuter, [IgnoreCase=true, IgnoreSpace=true, Threshold=.3])

 

Any help would be greatly appreciated.

 

Thanks