Forum Discussion

algorton's avatar
algorton
Frequent Visitor
3 years ago
Solved

Merge / append two columns from 2 tables

Hi all

 

I have seen various iterations of this topic on the forums but none meet my sepcific requirement. I have two tables:

Table A

NameSerialNumber
Hostname1PC0TKV9P
Hostname2MJ06T78T
Hostname3S4L43403

 

Table B

Device nameOSOS versionManufacturerSerial number
Hostname11Windows10.0.19045.2846SAMSUNG ELECTRONICS CO., LTD.ZQ4W93AZ300561
Hostname12Windows10.0.19044.2846LENOVOYM101ZF9
Hostname13Windows10.0.19044.2846LENOVOYH011NVM

 

What I would like is to create a new table with two columns, one for Name and one for Serial number, e.g.:

Table C

NameSerialNumber
Hostname1PC0TKV9P
Hostname2MJ06T78T
Hostname3S4L43403
Hostname11ZQ4W93AZ300561
Hostname12YM101ZF9
Hostname13YH011NVM

 

Any help / suggestions would be greatly appreciated!

 

  • algorton In your Power Query Editor, edit the query for your 2nd table and remove your OS Version and Manufacturer columns. Then Append the queries.

  • Hi,

     

    Only change the column names in Power Query before the Append. In the table B, instead of 'Device name', switch it to 'Name' (as in the table A) and 'Serial Number' to 'SerialNumber'.

     

    Once Appended, you can keep only these two columns.

4 Replies

  • grodriguezb's avatar
    grodriguezb
    Regular Visitor

    Hi,

     

    Only change the column names in Power Query before the Append. In the table B, instead of 'Device name', switch it to 'Name' (as in the table A) and 'Serial Number' to 'SerialNumber'.

     

    Once Appended, you can keep only these two columns.

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    algorton In your Power Query Editor, edit the query for your 2nd table and remove your OS Version and Manufacturer columns. Then Append the queries.

    • algorton's avatar
      algorton
      Frequent Visitor

      Hi Greg

       

      Thanks for the suggestion, I need the information in table b for other parts of the report; do you think if I copy the table and then perform the optiosn you suggested is the best way to approach this?