Forum Discussion

DylanBanINT's avatar
DylanBanINT
Helper I
4 years ago
Solved

Combining two tables with same ID but different information

Hi, I have two tables which have have the same ID on them however one table combines more informationt than the other, I am looking to combine both into a new table but only show information if the IDs both match and if there are IDs that don't match they don't show on the table.

 

For example I have these two tables:

 

IDNAMEAMOUNT
1Chris100
2John50
3Stephanie23
4John25
5Mark7
6Chris

35

 

MONTHIDCOLOURDAY
January1BlueMonday
March2RedFriday
April3GreenSunday
December4BlueTuesday
September5PurpleMonday
April6OrangeWednesday
January7RedSaturday
May8PinkSunday
November9GreenTuesday
February10PurpleMonday
March11PinkThursday
December12BlueFriday
May13RedSunday

 

So I am looking to combine all this information so that it would look something like this:

 

IDNAMEAMOUNTMONTHCOLOURDAY
1Chris100JanuaryBlueMonday
2John50MarchRedFriday
3Stephanie23AprilGreenSunday
4John25DecemberBlueTuesday
5Mark7SeptemberPurpleMonday
6Chris35AprilOrangeWednesday

 

The data I am working with is live from a Sharepoint site so looking for this to update automatically as that site updates. 

 

Thanks in advance for any help anyone can provide on this! 

  • DylanBanINT ,

    Use Merge as new from Merge Queries in Power query editor,

    1. 

    2. Do join kind inner,

     

    3. You will get your output,

    Thanks,

    Arul

     

     



  • Ale's avatar
    Ale
    4 years ago

    Hi DylanBanINT ,

     

    please make sure you selected the right fields (ID) and that they have the same data type. It must work if they have the same type and matching values.

     

    If possible, could you share a screenshot of your data tables?

7 Replies

  • Ale's avatar
    Ale
    Resolver II

    I'm not used to Live connection, but can't you simply Merge the 2 queries in Transform Data? Just selected the Join Kind Inner.

     

    If this is not an option in Live connection, please let me know.

     

    Edit: If you want, you can also create a result table using NATURALINNERJOIN() function.

    Result Table = NATURALINNERJOIN(Table1, Table2)

     

    • DylanBanINT's avatar
      DylanBanINT
      Helper I

      Hi, so it seems with the specific information I'm using, that although I can go in and see that there are 100% matches from each column, when I try to merge it shows as no matches

      • Ale's avatar
        Ale
        Resolver II

        Hi DylanBanINT ,

         

        please make sure you selected the right fields (ID) and that they have the same data type. It must work if they have the same type and matching values.

         

        If possible, could you share a screenshot of your data tables?

  • Arul's avatar
    Arul
    Super User

    DylanBanINT ,

    Use Merge as new from Merge Queries in Power query editor,

    1. 

    2. Do join kind inner,

     

    3. You will get your output,

    Thanks,

    Arul

     

     



    • DylanBanINT's avatar
      DylanBanINT
      Helper I

      Hi, so it seems with the specific information I'm using, that although I can go in and see that there are 100% matches from each column, when I try to merge it shows as no matches