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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
shwetakumari
New Member

Extract data from table1 which are different from Table2

Scenario:

 

Table A : Having One Column 

Table B : Having Multiple Columns 

 

Table A (Col 1)

 

AAA

BBB

CCC

DDD

EEE

FFF

 

Table B (Col1 )

 

AAA

EEE

 

Output Expected  : Table A – Table B 

 

BBB

CCC

DDD

FFF

 

How to achieve the same. Kindly help

2 ACCEPTED SOLUTIONS
Fowmy
Super User
Super User

@shwetakumari 

From the home tab, Merge Queries > Merge Queries as New > select

Merge Queries and select LEFT ANTI as join type. click OK and delete the last column

Screenshot 2021-01-14 094358.jpg

________________________

If my answer was helpful, please click Accept it as the solution to help other members find it useful

Click on the Thumbs-Up icon if you like this reply 🙂


Website YouTube  LinkedIn

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

v-cazheng-msft
Community Support
Community Support

Hi, @shwetakumari 

You can use EXCEPT function to create a Calculated table to get the result you want.

 

v-cazheng-msft_0-1610932798368.jpeg

 

 

Output Expected = EXCEPT(TableA,VALUES(TableB[Col1]))

 

The result looks like this:

v-cazheng-msft_1-1610932798369.png

 

Best Regards,

Caiyun Zheng

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-cazheng-msft
Community Support
Community Support

Hi, @shwetakumari 

You can use EXCEPT function to create a Calculated table to get the result you want.

 

v-cazheng-msft_0-1610932798368.jpeg

 

 

Output Expected = EXCEPT(TableA,VALUES(TableB[Col1]))

 

The result looks like this:

v-cazheng-msft_1-1610932798369.png

 

Best Regards,

Caiyun Zheng

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

PC2790
Community Champion
Community Champion

Hi @shwetakumari ,

 

You can do it in Power Query.

Follow the below steps:

1) Load the two tables as usual.

2) Go to 'Transform Data' to open Query Editor

3) Click on 'New Source' and select Blank Query.

4) Delete the existing code and replace it with the code provided below:

 

let
    differenceTA_= List.Difference(TableA[ID], TableB[ID]),
    TableA_ = Table.SelectRows(TableA, each List.Contains(differenceTA_, [ID]))
in
    TableA_

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

Fowmy
Super User
Super User

@shwetakumari 

From the home tab, Merge Queries > Merge Queries as New > select

Merge Queries and select LEFT ANTI as join type. click OK and delete the last column

Screenshot 2021-01-14 094358.jpg

________________________

If my answer was helpful, please click Accept it as the solution to help other members find it useful

Click on the Thumbs-Up icon if you like this reply 🙂


Website YouTube  LinkedIn

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors