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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

In Power Query, How to add a Column from One Table to Another - if the Tables Share a Common Column?

 
1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @Anonymous 

 

Download example PBIX file

 

I knocked together some sample data.  Select the LOTS1 tabe and then click on Merge Queries -> Merge Queries as New.

 

If you want to just add the column to LOTS1, just select Merge Queries rather than Merge Queries as New.

 

mrgn.png

 

 

Choose LOTS 2 as the 2nd table.  Click on the START_TIME column in both tables to match them.

 

make sure the Join Kind is Left Outer.  Click OK.

 

mrgn2.png

 

 

You'll get a new column with a table in each row.  Click the double headed arrow in the column header to extract the columns in the tables.

 

mrgn3.png

 

 

 

Select only the BATCH# column and uncheck the 'Use original column name as prefix'.

 

mrgn4.png

 

 

 

Done.

 

mrgn5.png

 

Regards

 

Phil

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

3 REPLIES 3
PhilipTreacy
Super User
Super User

Hi @Anonymous 

 

Download example PBIX file

 

I knocked together some sample data.  Select the LOTS1 tabe and then click on Merge Queries -> Merge Queries as New.

 

If you want to just add the column to LOTS1, just select Merge Queries rather than Merge Queries as New.

 

mrgn.png

 

 

Choose LOTS 2 as the 2nd table.  Click on the START_TIME column in both tables to match them.

 

make sure the Join Kind is Left Outer.  Click OK.

 

mrgn2.png

 

 

You'll get a new column with a table in each row.  Click the double headed arrow in the column header to extract the columns in the tables.

 

mrgn3.png

 

 

 

Select only the BATCH# column and uncheck the 'Use original column name as prefix'.

 

mrgn4.png

 

 

 

Done.

 

mrgn5.png

 

Regards

 

Phil

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Anonymous
Not applicable

.

PhilipTreacy
Super User
Super User

Hi @Anonymous 

 

Yes you can Merge the queries (tables) using a Left Join matched on the START_TIME column.

 

Without your data I can't give you the code to do it though.

 

Regards

 

Phil

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.