<?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: comparing two tables with same structure in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/comparing-two-tables-with-same-structure/m-p/343196#M702673</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would suggest using the Exists() function in something similar to the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DocNoMayIndex:&lt;/P&gt;&lt;P&gt;Load distinct [doc no] as DocNoMay from MayData;&lt;/P&gt;&lt;P&gt;DocNoJunIndex:&lt;/P&gt;&lt;P&gt;Load distinct [doc no] as DocNoJun from JunData;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AllDocuments:&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(Exists(DocNoMay,[doc no]) and not Exists(DocNoJun,[doc no]),'Closed',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(not Exists(DocNoMay,[doc no]) and Exists(DocNoJun,[doc no]),'New',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Open')) as DocType&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;From ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Jul 2012 13:39:13 GMT</pubDate>
    <dc:creator>hic</dc:creator>
    <dc:date>2012-07-10T13:39:13Z</dc:date>
    <item>
      <title>comparing two tables with same structure</title>
      <link>https://community.qlik.com/t5/QlikView/comparing-two-tables-with-same-structure/m-p/343195#M702672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 2 tables with invoices and receipts documents from 2 months - May and June, having same fields structure (doc no, doc date, customer name, customer ID, value etc.), and I want to compare them as below&lt;/P&gt;&lt;P&gt;1. "Closed docs" - only documents from May file which aren't in June file;&lt;/P&gt;&lt;P&gt;2. "New docs" - only documents from June file which aren't in May file;&lt;/P&gt;&lt;P&gt;3. "Open docs" - only documents which exists in May and June files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haw can I transpose those conditions into script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Olivia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2012 12:45:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/comparing-two-tables-with-same-structure/m-p/343195#M702672</guid>
      <dc:creator />
      <dc:date>2012-07-10T12:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: comparing two tables with same structure</title>
      <link>https://community.qlik.com/t5/QlikView/comparing-two-tables-with-same-structure/m-p/343196#M702673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would suggest using the Exists() function in something similar to the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DocNoMayIndex:&lt;/P&gt;&lt;P&gt;Load distinct [doc no] as DocNoMay from MayData;&lt;/P&gt;&lt;P&gt;DocNoJunIndex:&lt;/P&gt;&lt;P&gt;Load distinct [doc no] as DocNoJun from JunData;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AllDocuments:&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(Exists(DocNoMay,[doc no]) and not Exists(DocNoJun,[doc no]),'Closed',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(not Exists(DocNoMay,[doc no]) and Exists(DocNoJun,[doc no]),'New',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Open')) as DocType&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;From ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2012 13:39:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/comparing-two-tables-with-same-structure/m-p/343196#M702673</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2012-07-10T13:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: comparing two tables with same structure</title>
      <link>https://community.qlik.com/t5/QlikView/comparing-two-tables-with-same-structure/m-p/343197#M702674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Olivia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jul 2012 05:49:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/comparing-two-tables-with-same-structure/m-p/343197#M702674</guid>
      <dc:creator />
      <dc:date>2012-07-18T05:49:17Z</dc:date>
    </item>
  </channel>
</rss>

