<?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 More than one column in Exists condition in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/More-than-one-column-in-Exists-condition/m-p/297194#M710956</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Use where not (exists (Day_No,Day_No)&lt;/P&gt;&lt;P&gt;and exists(Cntry_Cd,Cntry_Cd));&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 May 2011 08:37:18 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-05-13T08:37:18Z</dc:date>
    <item>
      <title>More than one column in Exists condition</title>
      <link>https://community.qlik.com/t5/QlikView/More-than-one-column-in-Exists-condition/m-p/297192#M710954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to compare more than one column using exists function...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fact:&lt;BR /&gt;//To get the new records&lt;BR /&gt;LOAD Day_No, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cntry_Cd,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Insert_Day_No &lt;/P&gt;&lt;P&gt;FROM&lt;BR /&gt;POC.xls&lt;BR /&gt;(biff, embedded labels, table is Exists2$)&lt;BR /&gt;where Insert_Day_No&amp;gt;1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate&lt;/P&gt;&lt;P&gt;//to get the previous day's records&lt;BR /&gt;LOAD Day_No, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cntry_Cd,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Insert_Day_No&lt;/P&gt;&lt;P&gt;FROM&lt;BR /&gt;POC.xls&lt;BR /&gt;(biff, embedded labels, table is Exists1$)&lt;BR /&gt;where not exists (Day_No,Day_No)&lt;/P&gt;&lt;P&gt;and not exists(Cntry_Cd,Cntry_Cd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to check whether the combination of Day_No and Cntry_Cd is available in the resultset of the upper query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this is not working as expected...Please help me on this....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2011 06:29:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/More-than-one-column-in-Exists-condition/m-p/297192#M710954</guid>
      <dc:creator />
      <dc:date>2011-05-13T06:29:55Z</dc:date>
    </item>
    <item>
      <title>More than one column in Exists condition</title>
      <link>https://community.qlik.com/t5/QlikView/More-than-one-column-in-Exists-condition/m-p/297193#M710955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to concatenate the two columns to be compared.&lt;/P&gt;&lt;P&gt;A good idea is also to include a "special" character between the concatenation&lt;/P&gt;&lt;P&gt;to avoid that the combination of Day_No "1" and Cntry_Cd "21" is confused with the combination of Day_No "12" and Cntry_Cd "1".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So something like this will do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fact:&lt;/P&gt;&lt;P&gt;//To get the new records&lt;/P&gt;&lt;P&gt;LOAD Day_No,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cntry_Cd,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Insert_Day_No,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Day_no&amp;amp;'¤'&amp;amp;Cntry_Cd As ComboKey&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;POC.xls&lt;/P&gt;&lt;P&gt;(biff, embedded labels, table is Exists2$)&lt;/P&gt;&lt;P&gt;where Insert_Day_No&amp;gt;1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate&lt;/P&gt;&lt;P&gt;//to get the previous day's records&lt;/P&gt;&lt;P&gt;LOAD Day_No,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cntry_Cd,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Insert_Day_No,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Day_no&amp;amp;'¤'&amp;amp;Cntry_Cd As ComboKey&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;POC.xls&lt;/P&gt;&lt;P&gt;(biff, embedded labels, table is Exists1$)&lt;/P&gt;&lt;P&gt;where not exists (ComboKey,Day_no&amp;amp;'¤'&amp;amp;Cntry_Cd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Field ComboKey; // If you don't want to use it anymore&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2011 07:14:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/More-than-one-column-in-Exists-condition/m-p/297193#M710955</guid>
      <dc:creator>gandalfgray</dc:creator>
      <dc:date>2011-05-13T07:14:02Z</dc:date>
    </item>
    <item>
      <title>More than one column in Exists condition</title>
      <link>https://community.qlik.com/t5/QlikView/More-than-one-column-in-Exists-condition/m-p/297194#M710956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Use where not (exists (Day_No,Day_No)&lt;/P&gt;&lt;P&gt;and exists(Cntry_Cd,Cntry_Cd));&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2011 08:37:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/More-than-one-column-in-Exists-condition/m-p/297194#M710956</guid>
      <dc:creator />
      <dc:date>2011-05-13T08:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: More than one column in Exists condition</title>
      <link>https://community.qlik.com/t5/QlikView/More-than-one-column-in-Exists-condition/m-p/297195#M710957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;did you mean &lt;/P&gt;&lt;P&gt;&lt;EM&gt;"not (exists (Day_No,Day_No)&amp;nbsp; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;and&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;not exists(Cntry_Cd,Cntry_Cd));"?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;i'm not sure it is correct.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;regarding the ComboKey - is it the best practice?&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2012 10:40:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/More-than-one-column-in-Exists-condition/m-p/297195#M710957</guid>
      <dc:creator />
      <dc:date>2012-06-26T10:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: More than one column in Exists condition</title>
      <link>https://community.qlik.com/t5/QlikView/More-than-one-column-in-Exists-condition/m-p/297196#M710958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The combokey and the "exists(..) and exists(..)' give different results, so the choice depends on what you require.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The combokey tests for the existence of the &lt;EM&gt;combination &lt;/EM&gt;of values of field1 and field2. This test is correct when the combinations are important (ie field1 and field2 are related in some way, however loosely), and I expect would be the more common requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The separate exists clauses test for existence of a value of field1, regardless of the value of field2 and the the existence of a value of field2 regardless of field1. This test is correct if field1 and field2 need to be tested individually, and there is no direct relationship between them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope I made that clear &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/confused.png" /&gt;...&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2012 11:25:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/More-than-one-column-in-Exists-condition/m-p/297196#M710958</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2012-06-26T11:25:16Z</dc:date>
    </item>
  </channel>
</rss>

