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

Merging Issue, return value based on 2 columns instead of matching 1 column

Hello everyone i have 2 tables

IDOrder ID

1aaaa-bbbb
2aabb-bbaa
1123-gvb
2abdf-475
2gsgsd-4674


and table 2

Order IDAmountID

aaaa-bbbb4861
aaaa-bbbb6841
aaaa-bbbb345311
aabb-bbaa448412
aabb-bbaa532
aabb-bbaa772
aabb-bbaa4642
aabb-bbaa1762



when i merge between the wto tables taking id as the key, ordr ID doesnt math and i get multiple rows

pbiguru123_0-1714666891973.png




when i expand, i get this


 

pbiguru123_1-1714666946956.png



i need to add a condition to return order id equal to the main order id which is only aaaa-bbbb for the first 2 examples and not add new rows as yo usee, so match orderid and id 

1 ACCEPTED SOLUTION
dufoq3
Super User
Super User

Hi @Anonymous, 

 

hold CTRL during merge step and select continuously columns ID and then Order ID. It will consider matching on both columns, but to be honest I don't understand why do you want to get Order ID from another table when you have Order ID in this table already.

 

dufoq3_0-1714668913530.png

 

Result

dufoq3_1-1714668943546.png

 


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

View solution in original post

2 REPLIES 2
dufoq3
Super User
Super User

Hi @Anonymous, 

 

hold CTRL during merge step and select continuously columns ID and then Order ID. It will consider matching on both columns, but to be honest I don't understand why do you want to get Order ID from another table when you have Order ID in this table already.

 

dufoq3_0-1714668913530.png

 

Result

dufoq3_1-1714668943546.png

 


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

Anonymous
Not applicable

i did not know i could do that cheers

Helpful resources

Announcements
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 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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