Forum Discussion
Fuzzy option, or Table.FuzzyNestedJoin, not available
- Anonymous4 years ago
You could try adding a column that uses text functions on the current row value, and use them to compare to the other table's column values as as a list, and then wrap that in Table.FindText. Of course the more parameters you use, the slower this would be:
Getlength = Table.AddColumn(PriorStepOrTableName, "len", each Text.Length([Client])-2, type number),
Custom3 = Table.AddColumn(Getlength, "front", each Text.Start([Client], [len]), type text),
Custom4 = Table.AddColumn(Custom3, "back", each Text.End([Client], [len]), type text),
Custom5 = Table.AddColumn(Custom4, "Fuzzy", each if List.Contains(Mail[Client], [Client]) then Table.FindText(Mail, [Client]) else if List.Contains(Mail[Client], [front]) then Table.FindText(Mail, [front]) else if List.Contains(Mail[Client], [back]) then Table.FindText(Mail, [back]) else null)
in
Custom5Basically, you are adding a column for some (by no means comprehensive) text permutations. Her is if the all but the first or last two characters match, we bring in a match from the other table. I'm sure that @Imke or any of the other experts could do this without adding the columns first. But just showing you that you can specify a lot of ways you' d like to match, and then use Table.FindText to bring in the matching rows instead of Table.Join.
Again, this is not very elegant, and it's pretty late, but like I said, any of the pros on here can probably improve upon this code once they get my point. Hope any of this makes sense, but the kids are upstairs like it's noon, and it's 1:43 AM, better see ehat's going on up there!
--Nate
You could try adding a column that uses text functions on the current row value, and use them to compare to the other table's column values as as a list, and then wrap that in Table.FindText. Of course the more parameters you use, the slower this would be:
Getlength = Table.AddColumn(PriorStepOrTableName, "len", each Text.Length([Client])-2, type number),
Custom3 = Table.AddColumn(Getlength, "front", each Text.Start([Client], [len]), type text),
Custom4 = Table.AddColumn(Custom3, "back", each Text.End([Client], [len]), type text),
Custom5 = Table.AddColumn(Custom4, "Fuzzy", each if List.Contains(Mail[Client], [Client]) then Table.FindText(Mail, [Client]) else if List.Contains(Mail[Client], [front]) then Table.FindText(Mail, [front]) else if List.Contains(Mail[Client], [back]) then Table.FindText(Mail, [back]) else null)
in
Custom5
Basically, you are adding a column for some (by no means comprehensive) text permutations. Her is if the all but the first or last two characters match, we bring in a match from the other table. I'm sure that @Imke or any of the other experts could do this without adding the columns first. But just showing you that you can specify a lot of ways you' d like to match, and then use Table.FindText to bring in the matching rows instead of Table.Join.
Again, this is not very elegant, and it's pretty late, but like I said, any of the pros on here can probably improve upon this code once they get my point. Hope any of this makes sense, but the kids are upstairs like it's noon, and it's 1:43 AM, better see ehat's going on up there!
--Nate