<?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: EXISTS() and LOOKUP? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/EXISTS-and-LOOKUP/m-p/448986#M167539</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 would recommend to go to Help - Contents index and search for these two functions, since they are well explained there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In short words EXISTS is used to limit a table load, based on loaded data in the script so far.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOKUP is used to look up a fieldvalue based on a matching field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;br&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Dec 2012 16:14:59 GMT</pubDate>
    <dc:creator>pauljohansson</dc:creator>
    <dc:date>2012-12-18T16:14:59Z</dc:date>
    <item>
      <title>EXISTS() and LOOKUP?</title>
      <link>https://community.qlik.com/t5/QlikView/EXISTS-and-LOOKUP/m-p/448984#M167537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,...&lt;/P&gt;&lt;P&gt;Please anyone can explain...&lt;/P&gt;&lt;P&gt;what is Main purpose of &lt;STRONG&gt;EXISTS&lt;/STRONG&gt; function?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and &lt;STRONG&gt;LOOKUP() ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 15:59:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/EXISTS-and-LOOKUP/m-p/448984#M167537</guid>
      <dc:creator />
      <dc:date>2012-12-18T15:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: EXISTS() and LOOKUP?</title>
      <link>https://community.qlik.com/t5/QlikView/EXISTS-and-LOOKUP/m-p/448985#M167538</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;are you preparing for some kind of exam? That's quite a abstract and general question, so I give you a general answer:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you hit F1, this will open the HELP in QV desktop:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H4&gt;&lt;SPAN class="Bold"&gt;exists(&lt;/SPAN&gt;&lt;A name="kanchor46"&gt;&lt;/A&gt;&lt;A name="exists"&gt;&lt;/A&gt;&lt;SPAN style="font-style: italic;"&gt;field [ , expression ]&lt;/SPAN&gt; ) &lt;/H4&gt;&lt;P style="background-color: #ffffff;"&gt;Determines whether a specific field value exists in a specified field of the data loaded so far. &lt;SPAN style="font-style: italic;"&gt;Field&lt;/SPAN&gt; is a name or a string expression evaluating to a field name. The field must exist in the data loaded so far by the script. &lt;SPAN style="font-style: italic;"&gt;Expr&lt;/SPAN&gt; is an expression evaluating to the field value to look for in the specified field. If omitted, the current record’s value in the specified field will be assumed.&lt;/P&gt;&lt;H2&gt;Examples:&lt;/H2&gt;&lt;P style="font-weight: bold;"&gt;exists(Month, 'Jan')&lt;SPAN style="font-weight: normal;"&gt;&lt;BR /&gt;returns -1 (true) if the field value &lt;/SPAN&gt;&lt;SPAN style="font-style: italic; font-weight: normal;"&gt;'Jan'&lt;/SPAN&gt;&lt;SPAN style="font-weight: normal;"&gt; is found in the current content of the field &lt;/SPAN&gt;&lt;SPAN style="font-style: italic; font-weight: normal;"&gt;Month.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: bold;"&gt;&lt;SPAN style="font-style: italic; font-weight: normal;"&gt;exists(IDnr, IDnr)&lt;/SPAN&gt;&lt;SPAN style="margin-left: 40px; font-weight: normal;"&gt;&lt;BR /&gt;returns -1 (true) if the value of the field IDnr in the current record already exists in any previously read record containing that field.&lt;/SPAN&gt; &lt;/P&gt;&lt;P style="font-weight: bold;"&gt;exists (IDnr)&lt;SPAN style="font-weight: normal;"&gt;&lt;BR /&gt;is identical to the previous example.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: bold;"&gt;Load Employee, ID, Salary from Employees.csv;&lt;SPAN style="font-weight: normal;"&gt;&lt;BR /&gt;Load FirstName&amp;amp; ' ' &amp;amp;LastName as Employee, Comment from Citizens.csv where exists (Employee, FirstName&amp;amp; ' ' &amp;amp;LastName);&lt;BR /&gt;Only comments regarding those citizens who are employees are read.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: bold;"&gt;Load A, B, C, from Employees.csv where not exists (A);&lt;SPAN style="font-weight: normal;"&gt;&lt;BR /&gt;This is equivalent to performing a distinct load on field A.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H4&gt;lookup&lt;A name="kanchor51"&gt;&lt;/A&gt;&lt;A name="lookup("&gt;&lt;/A&gt;( &lt;SPAN style="font-style: italic;"&gt;fieldname, matchfieldname, matchfieldvalue [, tablename]&lt;/SPAN&gt; )&lt;/H4&gt;&lt;P&gt;Returns the value of &lt;SPAN style="font-style: italic;"&gt;fieldname&lt;/SPAN&gt; corresponding to the first occurrence of the value &lt;SPAN style="font-style: italic;"&gt;matchfieldvalue&lt;/SPAN&gt; in the field &lt;SPAN style="font-style: italic;"&gt;matchfieldname&lt;/SPAN&gt;. &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style: italic;"&gt;Fieldname&lt;/SPAN&gt;, &lt;SPAN style="font-style: italic;"&gt;matchfieldname&lt;/SPAN&gt; and &lt;SPAN style="font-style: italic;"&gt;tablename&lt;/SPAN&gt; must be given as strings (e.g. quoted literals).&lt;/P&gt;&lt;P&gt;The search order is load order unless the table is the result of complex operations such as joins, in which case the order is not well defined. &lt;/P&gt;&lt;P&gt;Both &lt;SPAN style="font-style: italic;"&gt;fieldname&lt;/SPAN&gt; and &lt;SPAN style="font-style: italic;"&gt;matchfieldname&lt;/SPAN&gt; must be fields in the same table, specified by &lt;SPAN style="font-style: italic;"&gt;tablename&lt;/SPAN&gt;. If &lt;SPAN style="font-style: italic;"&gt;tablename&lt;/SPAN&gt; is omitted the current table is assumed. &lt;/P&gt;&lt;P&gt;If no match is found, null is returned.&lt;/P&gt;&lt;H2&gt;Example:&lt;/H2&gt;&lt;P style="font-weight: bold;"&gt;lookup('Price', 'ProductID', InvoicedProd, 'pricelist')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold;"&gt;Also searching &lt;STRONG&gt;the forum (search entry field at the top right) should return you lots of useful examples.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold;"&gt;&lt;STRONG&gt;Regards,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-weight: bold;"&gt;&lt;STRONG&gt;Stefan&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 16:09:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/EXISTS-and-LOOKUP/m-p/448985#M167538</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-12-18T16:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: EXISTS() and LOOKUP?</title>
      <link>https://community.qlik.com/t5/QlikView/EXISTS-and-LOOKUP/m-p/448986#M167539</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 would recommend to go to Help - Contents index and search for these two functions, since they are well explained there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In short words EXISTS is used to limit a table load, based on loaded data in the script so far.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOKUP is used to look up a fieldvalue based on a matching field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;br&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 16:14:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/EXISTS-and-LOOKUP/m-p/448986#M167539</guid>
      <dc:creator>pauljohansson</dc:creator>
      <dc:date>2012-12-18T16:14:59Z</dc:date>
    </item>
  </channel>
</rss>

