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
Anonymous
Not applicable

Power Query Innerjoin Distinct Values from Two Columns From Two Tables in One Step

Hello Power-Query Community, 

 

I want to innerjoin the distinct values from two columns from two tables (queries) in one single step in Power Query as a new table (query). Can this be done?

 

Table 1

Target ColumnRandom Column 1Random Column 2
1db
1qd
2bd
2db

 

Table 2

Target ColumnRandom Column 1Random Column 2
1fh
1ke
2gf
2gh
3wr
3fv

 

Expected Results Table

Result Column
1
2

 

I already tried something like:

 

= Table.Join(
Table.Distinct(Table1,{"TargetColumn"}),
Table.Distinct(Table2,{"TargetColumn"}),
"Expected Results Table",
JoinKind.InnerJoin
)

 

Can someone guide me into the right direction?


Many thanks in advance.

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

=Table.FromColumns({List.Distinct(List.Intersect({Table1[col],Table2[col]}))},{"Result"})

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

thank you! 

wdx223_Daniel
Super User
Super User

=Table.FromColumns({List.Distinct(List.Intersect({Table1[col],Table2[col]}))},{"Result"})

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.

Top Solution Authors
Top Kudoed Authors