Forum Discussion
Get Records from Table A that are not in Table B
- 9 years ago
Hi Amie-Louise
I have used your two dataset as 'Table1(Lead Website)' and 'Table1(Database)'
Here is your DesiredTable you want
Please Note
You have to create a Dummy Table which will hold the Intersect records of 'Table1(Lead Website)' and 'Table1(Database)'
DummyTable Screenshot
Steps:-
1. Switch to the Data View
2. Go to the Modelling Tab and choose New Table.
3. Fire the query
DummyTable = INTERSECT('Table1(Lead Website)','Table1(Database)')
4. Again Choose New Table
5. Fire the Query
DesiredTable = EXCEPT('Table1(Lead Website)',DummyTable)
If this is what you want then
Please give Kudos and Accept this as a solution
What are those two tables' schema like?
If they have the same column, you can use EXCEPT in SQL or in DAX.
SQL SELECT column1,column2,column3 FROM Table1 EXCEPT SELECT column1,column2,column3 FROM Table2 DAX difference Table = EXCEPT(Table1,Table2)
If they have different columns and the duplication is identified by some key column, say ID
SQL SELECT * FROM Table1 T1 WHERE NOT EXISTS(SELECT 1 FROM Table2 t2 WHERE t2.id=t1.id ) DAX difference Table = FILTER(Table1,NOT(CONTAINS(Table2,Table2[ID],Table1[ID])))
Best Answer
Thank you