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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How to add a column from a different table

Hi all, 

 

I have a simple question regarding Power Query. 

 

I am working on two tables. Tables have in common a column, and the link is made between the 2 tables. 

I'd like to add to table 1 a column of table 2, in PowerQuery. 

 

I cannot share my data since it is for business matt

1 ACCEPTED SOLUTION
KNP
Super User
Super User

@Anonymous - If you prefer a visual representation of what @JamesRobson is describing...

 

KNP_0-1647971774734.gif

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

View solution in original post

2 REPLIES 2
KNP
Super User
Super User

@Anonymous - If you prefer a visual representation of what @JamesRobson is describing...

 

KNP_0-1647971774734.gif

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x
JamesRobson
Resolver II
Resolver II

Hi,

 

 If i follow correctly you just want to merge the 2 tables and expand the column required

 

#"Merged Queries" = Table.NestedJoin(#"Renamed Columns", {"REP"}, PM_User, {"UserCode"}, "PM_User", JoinKind.LeftOuter),
#"Expanded PM_User" = Table.ExpandTableColumn(#"Merged Queries", "PM_User", {"UserName"}, {"PM_User.UserName"})

 

or

 

#"Merged Queries" = Table.NestedJoin(#"PreviousStepHere", {"Table1Column"}, Table2NameHere, {"Table2Column"}, "Table2NameHere", JoinKind.LeftOuter),
#"Expanded Table2NameHere" = Table.ExpandTableColumn(#"Merged Queries", "Table2NameHere", {"ColumnYouWantToAdd"}, {"ColumnYouWantToAdd"})

 

this would give you the column 'ColumnYouWantToAdd' from Table 2 added to Table 1

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors