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
vbvbvb
Employee
Employee

Fetch only matching data between 2 tables - union or merge?

Hi all, 

 

Looking at following dilemma, would appreciate any advice how to achive that.

I have one table which is fetching values from external data source, let's call this table MainTable:

 

Some ID Number Some DataMore Data
1234567AAA58
2345678BBB78
3456789CCC86
7890123
DDD53

 

Then there is another 3 tables which is fetching data from another source and then appends then into 1 joined table CombinedTable , where ID values can match values from MainTable, for example:

 

Some ID Number Some DataMore Data
4567890EEE90
3456789CCC86
5678901FFF33
2345678BBB78

 

What is easiest and most efficient way to compare values which exist in MainTable to values in CombinedTable  and keep them only if they are in MainTable , i.e final result should be:

 

Some ID Number Some Datadata
3456789CCC86
2345678BBB78

 

So in the nutshell, commom denominator for filtering would be always ID value from MainTable since CombinedTable would always contain signifcatly more values which are not needed. 

Thanks a lot for any ideas!

1 ACCEPTED SOLUTION
serpiva64
Super User
Super User

Hi,

You can merge your CombinedTable with MainTable using JoinKind Inner

serpiva64_0-1668511740391.png

You obtain this

serpiva64_1-1668511776807.png

Then you can remove column MainTable

If this post is useful to help you to solve your issue consider giving the post a thumbs up 

 and accepting it as a solution !

 

 

 

View solution in original post

2 REPLIES 2
serpiva64
Super User
Super User

Hi,

You can merge your CombinedTable with MainTable using JoinKind Inner

serpiva64_0-1668511740391.png

You obtain this

serpiva64_1-1668511776807.png

Then you can remove column MainTable

If this post is useful to help you to solve your issue consider giving the post a thumbs up 

 and accepting it as a solution !

 

 

 

Thanks, but it won't make any issues since real tables I have are way more complex and contain a lot of relationships and are merged themselves?

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.