Forum Discussion

otis_pc's avatar
otis_pc
Frequent Visitor
3 years ago

Merge not working despite identical value

I have two tables. Call the first #"Extracted Data" and the second #"Name Variations". 

 

Extracted Data

SourcePerson LeadLengthEncoded(merged) Employee ID
Swiss CowsDoe, Michael R.15068111101044032077105099104097101108032082046null
DuckDuckGoBuck, Jason A.14066117099107044032074097115111110032065046null
BraveFawn, Mercy H.1407009711911004403207710111409912103207204656942

 

Name Variations

Employee IDName CategoryValueLengthEncoded
1234LFMDoe, Michael R.15068111101044032077105099104097101108032082046
1234FLMichael Doe11077105099104097101108032068111101
987LFMBuck, Jason A.14066117099107044032074097115111110032065046
987FMLJason A. Buck13074097115111110032065046032066117099107
56942LFMFawn, Mercy H.14070097119110044032077101114099121032072046
56942LogonFAWNMH6070065087078077072

 

I am merging #"Name Variations" into #"Extracted Data" on [Person Lead] = [Value] and pulling in the [Employee ID] column.

 

[Person Lead] and [Value] in both tables have been cleaned and trimmed.

 

The merge works as expected except for two values: 'Doe, Michael R.' and 'Buck, Jason A.' which both return null for the [Employee ID] instead of their actual employee ids when merged on [Person Lead] = [Value].

 

If I copy 'Doe, Michael R.' directly out of the #"Extracted Data" table and filter the [Person Lead] column in #"Name Variations" by pasting that value in, #"Name Variations" returns the row I need, so the merge should work since the values are equal, but it doesn't.

 

Troubleshooting steps:

Everything in the troubleshooting steps comes back that merge should work: that is, the length is the same in both tables, the text is identical, the tables merge correctly using the Text.Select column, and the tables merge correctly using the encoded value.

 

But the value remains null after the merge on the original column pair of [Person Lead] = [Value].

 

Any ideas? I'm hoping for a 'duh' moment.

3 Replies

  • edhans's avatar
    edhans
    Community Champion

    If you can copy from Extracted Data into Name Variations and it works, but doesn't until you do that, they are not the same values. One of the most insidious causes of this is the non-breaking space, ASCII 160 vs the normal space char of ASCII 32. You cannot see it unless you have a text editor like NotePad++ and turn on visibility to all chars.


    If that is what it is, or similar, you need to copy that char to the clipboard, then on that column, do Transform, Replace Values, and paste that into the Value to Find box and type in a simple space in the Replace With box.

    Another alternative is to do a fuzzy merge. The default is .8, so turn it up to .9 or even .95 and see if it will merge without any find/replace.

     

      • edhans's avatar
        edhans
        Community Champion

        You are going to have to share data via Dropbox from a text file then or some other way. Pasting in the forum can strip the info out.