<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Get Records from Table A that are not in Table B in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Get-Records-from-Table-A-that-are-not-in-Table-B/m-p/142160#M4905</link>
    <description>&lt;P&gt;Thank you so much for sharing the below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;All working perfectly now &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Mar 2017 09:44:56 GMT</pubDate>
    <dc:creator>Amie-Louise</dc:creator>
    <dc:date>2017-03-14T09:44:56Z</dc:date>
    <item>
      <title>Get Records from Table A that are not in Table B</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Get-Records-from-Table-A-that-are-not-in-Table-B/m-p/138801#M4797</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to Power BI and SQL Queries (therefore apologies if my question seems very basic) ... I am trying to populate a table to show all records from Table A that are not in Table B and am not sure how to achieve this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Online there are lots of different websites however all the different versions of code I am trying doesn't seem to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If someone could please help that would be fab.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Amie.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 14:08:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Get-Records-from-Table-A-that-are-not-in-Table-B/m-p/138801#M4797</guid>
      <dc:creator>Amie-Louise</dc:creator>
      <dc:date>2017-03-08T14:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: Get Records from Table A that are not in Table B</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Get-Records-from-Table-A-that-are-not-in-Table-B/m-p/139373#M4823</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/23243"&gt;@Amie-Louise&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;What are those two tables' schema like?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If they have the same column, you can use EXCEPT in SQL or in DAX.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;SQL
 SELECT column1,column2,column3 FROM Table1
 EXCEPT
 SELECT column1,column2,column3 FROM Table2

DAX
 difference Table = EXCEPT(Table1,Table2) &lt;/PRE&gt;
&lt;P&gt;If they have different columns and the duplication is identified by some key column, say ID&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;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])))&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Mar 2017 06:58:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Get-Records-from-Table-A-that-are-not-in-Table-B/m-p/139373#M4823</guid>
      <dc:creator>Eric_Zhang</dc:creator>
      <dc:date>2017-03-09T06:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: Get Records from Table A that are not in Table B</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Get-Records-from-Table-A-that-are-not-in-Table-B/m-p/140362#M4843</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for coming back to me so quickly on this, so as an example the tables look like this:-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table 1 (Lead Website)&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Name&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Address&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Telephone Number&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Mr Smith&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;123 Main Street&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;123456&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Mr Jones&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;456 High Street&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;789101&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Mrs Peacock&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1 London Road&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;112131&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table 1 (Database)&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Name&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Address&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Telephone Number&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Mr Smith&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;123 Main Street&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;123456&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Mrs Peacock&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1 London Road&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;112131&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Dr Jackson&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;20 Roman Close&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;415161&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Miss Poppy&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;4 Ash Crescent&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;718192&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the above we would like to run a query to return the leads that are not on the database. In this case it would be Mr Jones.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does that help?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks,&lt;/P&gt;&lt;P&gt;Amie.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2017 14:53:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Get-Records-from-Table-A-that-are-not-in-Table-B/m-p/140362#M4843</guid>
      <dc:creator>Amie-Louise</dc:creator>
      <dc:date>2017-03-10T14:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: Get Records from Table A that are not in Table B</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Get-Records-from-Table-A-that-are-not-in-Table-B/m-p/140951#M4859</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/23243"&gt;@Amie-Louise&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;You can also try Power Query&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;let 
 
    LeadWebsite=  Table.FromRows({{"Mr Smith", "123 Main Street", "123456"} , {"Mr Jones", "456 High Street", "789101"},{"Mrs Peacock","1 London Road","112131"}}, {"Name", "Address", "Telephone Number"}),

    DataBase=Table.FromRows({{"Miss Poppy","4 Ash Crescent","718192"},{"Mr Smith", "123 Main Street", "123456"} , {"Dr Jackson", "20 Roman Close", "415161"},{"Mrs Peacock","1 London Road","112131"}}, {"Name", "Address", "Telephone Number"}),
     
    RemovedRowsList = Table.ToRecords(DataBase), 

    FilteredLeadWebsite= Table.RemoveMatchingRows(LeadWebsite,RemovedRowsList)

in
    FilteredLeadWebsite&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Mar 2017 08:55:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Get-Records-from-Table-A-that-are-not-in-Table-B/m-p/140951#M4859</guid>
      <dc:creator>Eric_Zhang</dc:creator>
      <dc:date>2017-03-12T08:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: Get Records from Table A that are not in Table B</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Get-Records-from-Table-A-that-are-not-in-Table-B/m-p/140978#M4860</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/23243"&gt;@Amie-Louise&lt;/a&gt;&lt;/P&gt;&lt;P&gt;I have used your two dataset as&amp;nbsp;&lt;SPAN&gt;'Table1(Lead Website)' and &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'Table1(Database)'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is your DesiredTable you want&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 600px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/32674i70D6BDF809C39ABD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please Note&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have to create a Dummy Table which will hold the Intersect records of&amp;nbsp;'Table1(Lead Website)' and &amp;nbsp;'Table1(Database)'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DummyTable Screenshot&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 600px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/32676i7E0ADA7EB23D37A4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steps:-&lt;/P&gt;&lt;P&gt;1. Switch&amp;nbsp;to the &lt;STRONG&gt;Data View&lt;/STRONG&gt; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 44px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/32677i5CB34C1927CB7DD1/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;2. Go to the &lt;STRONG&gt;Modelling Tab&lt;/STRONG&gt; and choose &lt;STRONG&gt;New Table.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;3. Fire&amp;nbsp;the query&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DummyTable = INTERSECT('Table1(Lead Website)','Table1(Database)')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;4. Again Choose New Table&amp;nbsp;&lt;/P&gt;&lt;P&gt;5. Fire the Query&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DesiredTable = EXCEPT('Table1(Lead Website)',DummyTable)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If&amp;nbsp;this&amp;nbsp;is what you want then&lt;/P&gt;&lt;P&gt;Please give Kudos and Accept this as a solution&lt;/P&gt;</description>
      <pubDate>Sun, 12 Mar 2017 12:26:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Get-Records-from-Table-A-that-are-not-in-Table-B/m-p/140978#M4860</guid>
      <dc:creator>kaushikd</dc:creator>
      <dc:date>2017-03-12T12:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Get Records from Table A that are not in Table B</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Get-Records-from-Table-A-that-are-not-in-Table-B/m-p/142160#M4905</link>
      <description>&lt;P&gt;Thank you so much for sharing the below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;All working perfectly now &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 09:44:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Get-Records-from-Table-A-that-are-not-in-Table-B/m-p/142160#M4905</guid>
      <dc:creator>Amie-Louise</dc:creator>
      <dc:date>2017-03-14T09:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: Get Records from Table A that are not in Table B</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Get-Records-from-Table-A-that-are-not-in-Table-B/m-p/1376131#M25753</link>
      <description>&lt;P&gt;This was the best answer. Not sure why you would need to do an INTERSECT first (another answer). This worked for me. Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 21:51:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Get-Records-from-Table-A-that-are-not-in-Table-B/m-p/1376131#M25753</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-16T21:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: Get Records from Table A that are not in Table B</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Get-Records-from-Table-A-that-are-not-in-Table-B/m-p/2488604#M35852</link>
      <description>&lt;P&gt;Best Answer&amp;nbsp;&lt;BR /&gt;Thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 12:14:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Get-Records-from-Table-A-that-are-not-in-Table-B/m-p/2488604#M35852</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-02T12:14:51Z</dc:date>
    </item>
  </channel>
</rss>

