<?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 value from another table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Lookup-value-from-another-table/m-p/1069360#M643372</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;Try with single quotes around 1st, 2nd and 4th argument of Lookup function and original field name for MyKey (Field1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-style: inherit; font-weight: inherit; font-size: 10pt; font-family: arial, helvetica, sans-serif; background-color: inherit;"&gt;&lt;STRONG&gt;TableB:&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-style: inherit; font-size: 10pt; font-family: arial, helvetica, sans-serif; background-color: inherit;"&gt;&lt;STRONG&gt;&lt;SPAN class="keyword" style="font-style: inherit; background-color: inherit;"&gt;LOAD&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; background-color: inherit;"&gt; &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="font-size: 10pt; font-style: inherit; line-height: 1.5em;"&gt;Field1 &lt;SPAN class="keyword" style="font-style: inherit; background-color: inherit;"&gt;As&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; background-color: inherit;"&gt; MyKey, &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-style: inherit; font-size: 10pt; font-family: arial, helvetica, sans-serif; background-color: inherit;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LookUp('Value', '&lt;SPAN class="keyword" style="font-style: inherit; background-color: inherit;"&gt;Key'&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; background-color: inherit;"&gt;, Field1, 'TableA') &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-style: inherit; background-color: inherit;"&gt;As&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; background-color: inherit;"&gt; ValueFromTableB&amp;nbsp; &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-style: inherit; font-size: 10pt; font-family: arial, helvetica, sans-serif; background-color: inherit;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field3 ...&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: #575757; font-size: 10pt; font-family: arial, helvetica, sans-serif; background-color: inherit;"&gt;&lt;STRONG&gt;&lt;SPAN class="keyword" style="font-style: inherit; background-color: inherit;"&gt;FROM&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit;"&gt;&lt;STRONG&gt; MySource&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #575757;"&gt;There is an example given for lookup in help section: &lt;/SPAN&gt;&lt;A href="http://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/InterRecordFunctions/LookUp.htm" title="http://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/InterRecordFunctions/LookUp.htm"&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;QlikView ‒ LookUp - script function&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Feb 2016 10:19:20 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-02-08T10:19:20Z</dc:date>
    <item>
      <title>Lookup value from another table</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-value-from-another-table/m-p/1069359#M643371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have what I think is a common question.&lt;/P&gt;&lt;P&gt;Simplified: I have two tables and want to pick/lookup/peek a value from TableA to TableB when scripting. I have a key. I have read about the functions but can't get which one to use and how to use them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TableA&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Key&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Value&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;b&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;c&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;d&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14549258913916276 jive_text_macro" jivemacro_uid="_14549258913916276" modifiedtitle="true"&gt;
&lt;P&gt;TableB:&lt;/P&gt;
&lt;P&gt;LOAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field1 As MyKey,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Lookup(Value, Key, MyKey, TableA) As ValueFromTableB&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field3 ...&lt;/P&gt;
&lt;P&gt;FROM MySource&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to accomplish a load where I can get the value from table B depending on which key I have in the current record from MySource.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Filip&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2016 10:16:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-value-from-another-table/m-p/1069359#M643371</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-08T10:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup value from another table</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-value-from-another-table/m-p/1069360#M643372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;Try with single quotes around 1st, 2nd and 4th argument of Lookup function and original field name for MyKey (Field1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-style: inherit; font-weight: inherit; font-size: 10pt; font-family: arial, helvetica, sans-serif; background-color: inherit;"&gt;&lt;STRONG&gt;TableB:&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-style: inherit; font-size: 10pt; font-family: arial, helvetica, sans-serif; background-color: inherit;"&gt;&lt;STRONG&gt;&lt;SPAN class="keyword" style="font-style: inherit; background-color: inherit;"&gt;LOAD&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; background-color: inherit;"&gt; &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="font-size: 10pt; font-style: inherit; line-height: 1.5em;"&gt;Field1 &lt;SPAN class="keyword" style="font-style: inherit; background-color: inherit;"&gt;As&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; background-color: inherit;"&gt; MyKey, &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-style: inherit; font-size: 10pt; font-family: arial, helvetica, sans-serif; background-color: inherit;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LookUp('Value', '&lt;SPAN class="keyword" style="font-style: inherit; background-color: inherit;"&gt;Key'&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; background-color: inherit;"&gt;, Field1, 'TableA') &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-style: inherit; background-color: inherit;"&gt;As&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; background-color: inherit;"&gt; ValueFromTableB&amp;nbsp; &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-style: inherit; font-size: 10pt; font-family: arial, helvetica, sans-serif; background-color: inherit;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field3 ...&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: #575757; font-size: 10pt; font-family: arial, helvetica, sans-serif; background-color: inherit;"&gt;&lt;STRONG&gt;&lt;SPAN class="keyword" style="font-style: inherit; background-color: inherit;"&gt;FROM&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit;"&gt;&lt;STRONG&gt; MySource&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #575757;"&gt;There is an example given for lookup in help section: &lt;/SPAN&gt;&lt;A href="http://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/InterRecordFunctions/LookUp.htm" title="http://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/InterRecordFunctions/LookUp.htm"&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;QlikView ‒ LookUp - script function&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2016 10:19:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-value-from-another-table/m-p/1069360#M643372</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-02-08T10:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup value from another table</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-value-from-another-table/m-p/1069361#M643373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-7929"&gt;Never look down – The Lookup() Story&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2016 10:19:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-value-from-another-table/m-p/1069361#M643373</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2016-02-08T10:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup value from another table</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-value-from-another-table/m-p/1069362#M643374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use apply map instead of lookup&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TEST1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * INLINE&lt;/P&gt;&lt;P&gt;[Field&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3 ];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MAP:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mapping LOAD * INLINE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[ Field,FiledVAlue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1,P1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2,P2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3,P3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TEST:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ApplyMap('MAP',Field) as Field1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resident TEST1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table TEST1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2016 10:33:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-value-from-another-table/m-p/1069362#M643374</guid>
      <dc:creator>vikasmahajan</dc:creator>
      <dc:date>2016-02-08T10:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup value from another table</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-value-from-another-table/m-p/1069363#M643375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Applymap is a good idea, but the only problem could be if there are more than 2 column in the table we are looking the value from. So if there are only 2 columns in Table A (as provided by OP) then I would definitely vouch for ApplyMap, but if there are more than 2, ApplyMap can't be used without doing a Resident Load of the data into a table which only has two columns.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2016 10:37:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-value-from-another-table/m-p/1069363#M643375</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-02-08T10:37:02Z</dc:date>
    </item>
  </channel>
</rss>

