<?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 ApplyMap or Join Only If Null in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/ApplyMap-or-Join-Only-If-Null/m-p/353233#M131057</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Use this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (Trim(OfficeName)='', ApplyMap('Office_Map_by_id', Id),OfficeName) as OfficeName&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 May 2012 15:11:55 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-05-17T15:11:55Z</dc:date>
    <item>
      <title>ApplyMap or Join Only If Null</title>
      <link>https://community.qlik.com/t5/QlikView/ApplyMap-or-Join-Only-If-Null/m-p/353228#M131052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do I conditionally apply a map or join?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 2 tables, 1 is my master data which has 2 columns - 1 with an OfficeID and 1 with OfficeName.&amp;nbsp; Sometimes OfficeID is populated and other times OfficeName.&amp;nbsp; I have a second table (link table) that has the list of OfficeID's and corresponding names.&amp;nbsp; I want to apply a map or populate all of the NULL OfficeName records with the information from the second table.&amp;nbsp; What is the best way to accomplish this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 21:54:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ApplyMap-or-Join-Only-If-Null/m-p/353228#M131052</guid>
      <dc:creator>sspringer</dc:creator>
      <dc:date>2012-05-15T21:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: ApplyMap or Join Only If Null</title>
      <link>https://community.qlik.com/t5/QlikView/ApplyMap-or-Join-Only-If-Null/m-p/353229#M131053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;can office names be the same for different ids?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;don't know is this the best way, but you can solve it with two mapping tables:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OFFICE:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * INLINE [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID, NAME&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, office_1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2, office_2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3, office_3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4, office_4&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5, office_5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6, office_6&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Office_Map_by_id:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Mapping LOAD&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID, NAME Resident OFFICE;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Office_Map_by_name:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Mapping LOAD&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NAME, ID Resident OFFICE;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TEST:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * INLINE [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; F1, F2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; , office_1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; , office_4&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; , office_5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; , office_5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TEST_RESULT:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; LOAD if (IsNull(F1) or trim(F1)='', ApplyMap('Office_Map_by_name', F2, null()), F1) as result_id,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(IsNull(F2) or trim(F2)='', ApplyMap('Office_Map_by_id', F1, null()), F2) as result_name&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resident TEST;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2012 10:56:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ApplyMap-or-Join-Only-If-Null/m-p/353229#M131053</guid>
      <dc:creator />
      <dc:date>2012-05-16T10:56:20Z</dc:date>
    </item>
    <item>
      <title>ApplyMap or Join Only If Null</title>
      <link>https://community.qlik.com/t5/QlikView/ApplyMap-or-Join-Only-If-Null/m-p/353230#M131054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If i understood your concept, you can achive this using mapping concept.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;Office:&lt;/P&gt;&lt;P&gt;Load OfficeID, OfficeName from Office:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Map1:&lt;/P&gt;&lt;P&gt;Mapping OfficeID,OfficeName Resident Office;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Office2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load *, ApplyMap('Map1',OfficeID,Null()) as OfficeName&lt;/P&gt;&lt;P&gt;From LinkTable;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2012 11:18:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ApplyMap-or-Join-Only-If-Null/m-p/353230#M131054</guid>
      <dc:creator>jagannalla</dc:creator>
      <dc:date>2012-05-16T11:18:43Z</dc:date>
    </item>
    <item>
      <title>ApplyMap or Join Only If Null</title>
      <link>https://community.qlik.com/t5/QlikView/ApplyMap-or-Join-Only-If-Null/m-p/353231#M131055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi sspringer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use isnull() clause to check where the office name is null and then use applymap to map it with office names as shown below in the load statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;if(isnull(office name)=-1, applymap())&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this help,&lt;/P&gt;&lt;P&gt;Anosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2012 12:25:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ApplyMap-or-Join-Only-If-Null/m-p/353231#M131055</guid>
      <dc:creator />
      <dc:date>2012-05-16T12:25:28Z</dc:date>
    </item>
    <item>
      <title>ApplyMap or Join Only If Null</title>
      <link>https://community.qlik.com/t5/QlikView/ApplyMap-or-Join-Only-If-Null/m-p/353232#M131056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I'm still not sure this solution works.&amp;nbsp; I tried this if(isnull(office name)=-1, applymap()) , however, if I use this and alias it as OfficeName, then I cannot also load OfficeName in the script above for rows that already have an OfficeName.&amp;nbsp; The problem is this:&amp;nbsp; I have a table with 20 rows, 10 rows already have OfficeName, but no OfficeID (those are fine).&amp;nbsp; 10 rows have OfficeID but no OfficeName - I need to fill in those OfficeName's using a different table.&lt;/P&gt;&lt;P&gt;Any more ideas?&amp;nbsp; Thank you so much for responding!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2012 13:14:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ApplyMap-or-Join-Only-If-Null/m-p/353232#M131056</guid>
      <dc:creator>sspringer</dc:creator>
      <dc:date>2012-05-16T13:14:14Z</dc:date>
    </item>
    <item>
      <title>ApplyMap or Join Only If Null</title>
      <link>https://community.qlik.com/t5/QlikView/ApplyMap-or-Join-Only-If-Null/m-p/353233#M131057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Use this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (Trim(OfficeName)='', ApplyMap('Office_Map_by_id', Id),OfficeName) as OfficeName&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2012 15:11:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ApplyMap-or-Join-Only-If-Null/m-p/353233#M131057</guid>
      <dc:creator />
      <dc:date>2012-05-17T15:11:55Z</dc:date>
    </item>
  </channel>
</rss>

