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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Torbennb
Frequent Visitor

Lookup value from another table based on two properties

I have two tables as this (example):

 

Torbennb_0-1739368146039.png

in table2 I want to lookup for the order number based on comparing the customer number and product number:

 

I tried something like this, but did not work:

If[custemer number] = tabel1(customer number) and [product number] = tabel1[product number], tabel1[order number], blank)

 

 

1 ACCEPTED SOLUTION
ZhangKun
Super User
Super User

You can follow the steps below without writing any code.

1. Click table2, then click the meger queries button

ZhangKun_0-1739368920441.png

2. Hold down ctrl and click the columns that need to be matched, then select the table table1 that needs to be matched below, then hold down ctrl and click the columns that need to be matched (note that the order of clicks must correspond to the previous columns), and then click the OK button.

ZhangKun_1-1739369004646.png

3. expand the required columns

ZhangKun_2-1739369169737.png

 

 

View solution in original post

2 REPLIES 2
Torbennb
Frequent Visitor

Thank you very much ZhangKun

ZhangKun
Super User
Super User

You can follow the steps below without writing any code.

1. Click table2, then click the meger queries button

ZhangKun_0-1739368920441.png

2. Hold down ctrl and click the columns that need to be matched, then select the table table1 that needs to be matched below, then hold down ctrl and click the columns that need to be matched (note that the order of clicks must correspond to the previous columns), and then click the OK button.

ZhangKun_1-1739369004646.png

3. expand the required columns

ZhangKun_2-1739369169737.png

 

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.