<?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: Lookup function???? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Lookup-function/m-p/533588#M199288</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://www.youtube.com/watch?v=jby-omVFNzI"&gt;https://www.youtube.com/watch?v=jby-omVFNzI&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's the link&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Jul 2013 22:21:42 GMT</pubDate>
    <dc:creator>rustyfishbones</dc:creator>
    <dc:date>2013-07-02T22:21:42Z</dc:date>
    <item>
      <title>Lookup function????</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-function/m-p/533586#M199286</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 have a table 1 with 3 fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Product code&lt;/P&gt;&lt;P&gt;Description&lt;/P&gt;&lt;P&gt;Location&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table 2 with a number of fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Product code&lt;/P&gt;&lt;P&gt;Balance &lt;/P&gt;&lt;P&gt;Cost&lt;/P&gt;&lt;P&gt;Etc......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both tables are linked by product code but there are product codes in table 1 with locations that don't exist in table 2. What I am trying to do is lookup product code from table 1 to see if they exist in table 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have looked into the lookup function but don't really understand how it works or if it will provide what I am looking to achieve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a function that will allow me to this, if exists?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gregg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 22:12:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-function/m-p/533586#M199286</guid>
      <dc:creator />
      <dc:date>2013-07-02T22:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup function????</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-function/m-p/533587#M199287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use APPLYMAP()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there is a video on YouTube&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 22:18:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-function/m-p/533587#M199287</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2013-07-02T22:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup function????</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-function/m-p/533588#M199288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://www.youtube.com/watch?v=jby-omVFNzI"&gt;https://www.youtube.com/watch?v=jby-omVFNzI&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's the link&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 22:21:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-function/m-p/533588#M199288</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2013-07-02T22:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup function????</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-function/m-p/533589#M199289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't want to have to maintain mapping tables I had a look at using apply map but because I need to look in two tables I'm not sure this will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to return a location in table 1 and in table 2 return the product code if it exists else return null.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 22:37:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-function/m-p/533589#M199289</guid>
      <dc:creator />
      <dc:date>2013-07-02T22:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup function????</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-function/m-p/533590#M199290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pretty sure applymap is what you need&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 22:43:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-function/m-p/533590#M199290</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2013-07-02T22:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup function????</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-function/m-p/533591#M199291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not mapping anything, so applymap is not needed, I am just trying to lookup information in another table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the information is there because I have set the link up through product code, I can get around it another way but I thought there would be a function to make it easier.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 08:19:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-function/m-p/533591#M199291</guid>
      <dc:creator />
      <dc:date>2013-07-03T08:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup function????</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-function/m-p/533592#M199292</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;You can use Exists instead of lookup in this case. See below example:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Table1:&lt;BR /&gt;Load * inline [&lt;BR /&gt;productCode, Description, Location&lt;BR /&gt;1001, aaaa, Mumbai&lt;BR /&gt;1002, bbbb, Mumbai&lt;BR /&gt;1003, cccc, Mumbai&lt;BR /&gt;1004, dddd, Pune&lt;BR /&gt;1005, eeee, Pune&lt;BR /&gt;1006, ffff, Pune&lt;BR /&gt;1007, gggg, mas&lt;BR /&gt;1008, hhhh, mas&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Table2:&lt;BR /&gt;Load * inline [&lt;BR /&gt;productCode, Balance, Cost&lt;BR /&gt;1001, 100,101&lt;BR /&gt;1002, 200, 202&lt;BR /&gt;1003, 300, 303&lt;BR /&gt;1004, 400, 404&lt;BR /&gt;1017, 700, 707&lt;BR /&gt;] Where Exists(productCode);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this make sence?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 08:40:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-function/m-p/533592#M199292</guid>
      <dc:creator />
      <dc:date>2013-07-03T08:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup function????</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-function/m-p/533593#M199293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you just want to check whether the value exists in Table2, you should use the Exists() function. For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2:&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;[Product code] as [Table2.Product code]&lt;/P&gt;&lt;P&gt;From Table2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table1:&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([Table2.Product code],[Product code]),'Exists', 'Does not exist') as CodeExists &lt;/P&gt;&lt;P&gt;From Table1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to check against a field that only exists in Table2, otherwise the Exists() function will pick up previous values in Table1 (if there are duplicates).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 08:48:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-function/m-p/533593#M199293</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2013-07-03T08:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup function????</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-function/m-p/533594#M199294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Henric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking for products that have a location in table 1 and dont exist in table 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this mean I have to break the product code link so they all wont associate and load?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, if I use &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;&amp;nbsp; If(Exists([Table2.Product code],[Product code]),'Exists', 'Does not exist') as CodeExists&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;I have a table 1 with 3 fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Product code&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Description&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Location&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Table 2 with a number of fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Product code&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Balance&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Cost&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you say I need to check against a field that only exists in table 2, does that mean I have to check against fieldname balance?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gregg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 10:15:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-function/m-p/533594#M199294</guid>
      <dc:creator />
      <dc:date>2013-07-03T10:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup function????</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-function/m-p/533595#M199295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you just want a way to find products that have no Balance (or Cost), but still have a Location, you should probably not hard-code the query in the script. Instead, in the GUI, just select all Balances and then select excluded in the Product code list box. If you have products in table 1 that lack location, you should as a third step select all Locations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See more in this blog post &lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/05/02/finding-null"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2013/05/02/finding-null&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want this property as a field, you need to define a field in the script in the way I described earlier.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Or you can use applymap to create a field "Has Location":&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HasLocation:&lt;/P&gt;&lt;P&gt;Mapping&lt;/P&gt;&lt;P&gt;Load [Product code], If(Len(Trim(Location))&amp;gt;0,True(),False()) as HasLocation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; From Table1 ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;Load * From Table1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2:&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ApplyMap('HasLocation',[Product code],False()) as HasLocation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; From Table2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Under no circumstances should you break the product code link.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 11:50:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-function/m-p/533595#M199295</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2013-07-03T11:50:59Z</dc:date>
    </item>
  </channel>
</rss>

