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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.