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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
BAFreedom
Helper I
Helper I

How to add another column from another table?

I have two tables, both have 1 common column that can be linked to each other.

Example:

Table 1 Columns: Item, Date of Purchase, Customer, Item ID

 

Table 2 Column: Item ID, Price, Effective Date

 

How do I create a query, such that I add 1 column from the 2nd table to the 1st table? Kind of like a VLOOKUP in excel.

Example here: is to add price (from table 2) into Table 1.

 

Thank you.

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

you can add a new column in Table1 with the code below:

Price2 = RELATED(Table2[Price])

 

 

or you want a query for a complete new table, try to create a new table with this:

Table3 =

ADDCOLUMNS(

    Table2,

    "Price2",

     RELATED(Table2[Price])

)

View solution in original post

2 REPLIES 2
FreemanZ
Super User
Super User

you can add a new column in Table1 with the code below:

Price2 = RELATED(Table2[Price])

 

 

or you want a query for a complete new table, try to create a new table with this:

Table3 =

ADDCOLUMNS(

    Table2,

    "Price2",

     RELATED(Table2[Price])

)

aj1973
Community Champion
Community Champion

Hi @BAFreedom 

In case you want to use DAX, watch this video

https://www.youtube.com/watch?v=6_O3UDKOVHo&t=3s

But if you want to use Power Query Editor to merge Columns and/or tables

https://www.youtube.com/watch?v=y3bOyNpJuXc

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors
Top Kudoed Authors