Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

merge queries

my table has 7 rows and 10 columns with the 1st column containing a urn; I split the table in 2 and both new tables have a column with the urn. Now I am unable to merge these 2 tables because the merge box doesn't tell me how many rows are matching. I also seem to be unable to activate the fuzzy matching option. Please help.

  • Anonymous's avatar
    Anonymous
    4 years ago

    hi Pete, basically I was skipping a step in the merging process: under Merge Queries I did select my 2 tables but I didn't highlight their common data column; once highlighted these columns, the OK button turned yellow and I could continue with the merge. Sorry for overlooking such a basic thing but thanks anyway.

6 Replies

  • Hi Anonymous ,

     

    I'm detecting an XY Problem here.

    Can you provide some higher level detail around your starting data and broadly what you're trying to achieve please? Then we can have a look at whether there's a better way from A to B.

     

    Pete

    • Anonymous's avatar
      Anonymous
      Not applicable

      hi Pete,

       

      basically i am trying to merge 2 tables and apparently that's not working.

      I created 2 tables from 1 existing table - by splitting it - using its URN column as primary key for the 2 new tables. By merging the 2 new tables I was hoping to recreate the existing initial table. Hope this clarifies a bit more. 

      • BA_Pete's avatar
        BA_Pete
        Super User

        Hi Anonymous ,

         

        It doesn't really add anything beyond your initial post, I'm afraid.

        My questions would be:

        Why are you splitting a table, then merging it on itself to recreate the original?

        What purpose, for your needs, does this serve?

        What is your end-goal by doing this?

        Are you re-merging the table on itself using different criteria than the original table supports?

         

        If you can post an example of your original table here, and let me know how you want it to look at the end, then I should be able to put something pretty efficient together for you.

         

        To post an example table, remove any sensitive information from the original and copy the entire table in PQ:

         

        Then, on the Home tab, select 'Enter Data' and paste your table in there.

        Once your new table has been created, select it, go to Advanced Editor, and copy the whole M query out of there. Paste it into a code window on here:

         

        This will allow me to copy that code into my PQ and have a perfect representation of your starting point.

         

        Pete