Forum Discussion
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
shwetakumari
From the home tab, Merge Queries > Merge Queries as New > selectMerge Queries and select LEFT ANTI as join type. click OK and delete the last column
________________________
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 π
Hi, shwetakumari
You can use EXCEPT function to create a Calculated table to get the result you want.
Output Expected = EXCEPT(TableA,VALUES(TableB[Col1]))
The result looks like this:
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.
3 Replies
- FowmySuper User
shwetakumari
From the home tab, Merge Queries > Merge Queries as New > selectMerge Queries and select LEFT ANTI as join type. click OK and delete the last column
________________________
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 π
- PC2790Community 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
- v-cazheng-msftCommunity Support
Hi, shwetakumari
You can use EXCEPT function to create a Calculated table to get the result you want.
Output Expected = EXCEPT(TableA,VALUES(TableB[Col1]))
The result looks like this:
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.