Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
algorton
Frequent Visitor

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!

 

2 ACCEPTED SOLUTIONS
Greg_Deckler
Super User
Super User

@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.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

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.

View solution in original post

4 REPLIES 4
algorton
Frequent Visitor

@Greg_Deckler @grodriguezb Thank you both; using both these suggestions I am now up and running!

 

I appreciate your quick responses!

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
Super User
Super User

@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.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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?

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.