<?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: apply map in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/apply-map/m-p/104115#M16421</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;PFA to observe the result produced by apply Map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Sep 2018 07:37:29 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-09-07T07:37:29Z</dc:date>
    <item>
      <title>apply map</title>
      <link>https://community.qlik.com/t5/QlikView/apply-map/m-p/104112#M16418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can someone please help in explaining applymap functionwith example,why we use it,how it works,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 07:10:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/apply-map/m-p/104112#M16418</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-07T07:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: apply map</title>
      <link>https://community.qlik.com/t5/QlikView/apply-map/m-p/104113#M16419</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;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;The MAPPING statement provides an alternative to the JOIN statement in a very specific scenario: when you want to replace a single key value with a value from a lookup (mapping) table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;We prefix ' Mapping' to the load statement to tell Qlikview that a table is a mapping table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;The mapping table is called with the 'Applymap()' function&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sample:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;MapTable:&lt;/P&gt;&lt;P&gt;Mapping&lt;/P&gt;&lt;P&gt;LOAD * Inline&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;RegionName,RegionCode&lt;/P&gt;&lt;P&gt;Asia,AS&lt;/P&gt;&lt;P&gt;Europe,Eur&lt;/P&gt;&lt;P&gt;MEA,ME&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;LOAD RegionName,&lt;/P&gt;&lt;P&gt;ApplyMap('MapTable',RegionName,'N/A')&lt;/P&gt;&lt;P&gt;Resident main;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop table MapTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 07:27:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/apply-map/m-p/104113#M16419</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-07T07:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: apply map</title>
      <link>https://community.qlik.com/t5/QlikView/apply-map/m-p/104114#M16420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;whats the result of the above statement?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 07:30:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/apply-map/m-p/104114#M16420</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-07T07:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: apply map</title>
      <link>https://community.qlik.com/t5/QlikView/apply-map/m-p/104115#M16421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;PFA to observe the result produced by apply Map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 07:37:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/apply-map/m-p/104115#M16421</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-07T07:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: apply map</title>
      <link>https://community.qlik.com/t5/QlikView/apply-map/m-p/104116#M16422</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;it's very similar to the V.LOOKUP function in excel.&lt;/P&gt;&lt;P&gt;For example if you have two tables like this in your database:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inventory:&lt;/P&gt;&lt;P&gt;Code, Quantity&lt;/P&gt;&lt;P&gt;a001, 100&lt;/P&gt;&lt;P&gt;a002,&amp;nbsp; 50&lt;/P&gt;&lt;P&gt;a003,&amp;nbsp; 70&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Products:&lt;/P&gt;&lt;P&gt;Code, Description&lt;/P&gt;&lt;P&gt;a001, first code&lt;/P&gt;&lt;P&gt;a002, second code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can join them using Code but if you create a table like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code, Quantity, Description&lt;/P&gt;&lt;P&gt;a001, 100, first code&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;a002,&amp;nbsp; 50, second code &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;a003, 70, -&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;but you get a null value in the description field... and you can't select it &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;if you use applymap you can put a value in the description field:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;map_description:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;mapping load Code, Description resident Products;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inventory:&lt;/P&gt;&lt;P&gt;load &lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Code&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;Quantity,&lt;/P&gt;&lt;P&gt;Applymap('map_description, &lt;SPAN style="text-decoration: underline;"&gt;Code&lt;/SPAN&gt;, 'not found') as Decription.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;applymap is far better.. in this case you can drop the Product table and your database is simpler and less CPU expensive...&lt;/P&gt;&lt;P&gt;In this way you can select "not found" values without any problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only problem of applymap comes when your mapping table isn't indexed.&lt;/P&gt;&lt;P&gt;If you have a situation like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Product:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Code, Description&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;a001, first code&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;a002, second code&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;a002, third code&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;if you have duplicate values applymap put the first one. Joins are better in this case because the error is visible early.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 12:12:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/apply-map/m-p/104116#M16422</guid>
      <dc:creator>captain89</dc:creator>
      <dc:date>2018-09-07T12:12:05Z</dc:date>
    </item>
  </channel>
</rss>

