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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

matching two tables with multiple values

I have two tables.

 

TABLE 1

Product IDICD Code
1A
1B
1C
2A
3B
3D

 

My second table looks like this:

TABLE 2

Product ID
1
3

 

I would like to match table 2 with table 1, so that the result looks like the following:

 

Expected Result

Product IDICD Code
1A
1B
1C
3B
3D

 

Since a simple lookup doesnt work here, does someone have a solution of how I can still match both tables preferably with DAX? Thanks so much as always!

1 ACCEPTED SOLUTION
FrankAT
Community Champion
Community Champion

Hi @Anonymous 

you can do it in report view like this:

 

08-09-_2020_17-22-32.png

 

With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

 

View solution in original post

4 REPLIES 4
v-diye-msft
Community Support
Community Support

Hi @Anonymous 

 

If the above posts help, please kindly mark it as a answer to help others find it more quickly. thanks!

If not, please kindly elaborate more.

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
FrankAT
Community Champion
Community Champion

Hi @Anonymous 

you can do it in report view like this:

 

08-09-_2020_17-22-32.png

 

With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

 

amitchandak
Super User
Super User

@Anonymous , Power query way

https://radacad.com/append-vs-merge-in-power-bi-and-power-query

 

DAX way

https://www.sqlbi.com/articles/from-sql-to-dax-joining-tables/

 

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
darentengmfs
Post Prodigy
Post Prodigy

Hi @Anonymous 

 

You can do a merge in Power Query.

 

Go to Power Query Editor, under Home tab - Combine, select Merge Queries. Choose column Product ID as the keys for both tables and select either Left Outer or Right Outer Join kind, depending on which table comes first. If TABLE 2 comes first, choose Left Outer, and if TABLE 2 is the second table, choose Right Outer. After the join, expand the data.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.