<?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 Creating an 'other' for catch-all? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Creating-an-other-for-catch-all/m-p/154826#M31306</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello again... After taking a step back from the problem I think I might have found my own solution...&lt;/P&gt;&lt;P&gt;ApplyMap??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;&lt;I&gt;Map_Region:&lt;BR /&gt;&lt;/I&gt;&lt;B&gt;MAPPING&lt;/B&gt; &lt;B&gt;LOAD&lt;BR /&gt;&lt;/B&gt; Upper (Prefix) &lt;B&gt;as&lt;/B&gt; PostCode_Prefix,&lt;BR /&gt; Region&lt;BR /&gt;&lt;B&gt;FROM&lt;BR /&gt;&lt;BR /&gt;&lt;/B&gt;E:\QlikViewDocuments\Test\HNW_by_region\Data\Regions.xlsx&lt;BR /&gt;(ooxml, embedded labels, table is Sheet1);&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;... and then apply the map with another load statement above the orginal load:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;&lt;B&gt;LOAD&lt;BR /&gt;&lt;/B&gt; *,&lt;BR /&gt; ApplyMap('Map_Region', Upper(PostCode_Part1),'Unknown') &lt;B&gt;as&lt;/B&gt; Region;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Jan 2011 13:12:58 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-01-05T13:12:58Z</dc:date>
    <item>
      <title>Creating an 'other' for catch-all?</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-an-other-for-catch-all/m-p/154825#M31305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!!&lt;/P&gt;&lt;P&gt;I'm loading a spreadsheet for postcode prefixes and their region (ie "MK" = "Midlands") and joining on the first part of the full postcode...&lt;/P&gt;&lt;P&gt;However there are some postcode prefixes in my data which do not have a match in the spreadsheet.&lt;/P&gt;&lt;P&gt;I'd like to set those records' prefixes to have a value of 'other' on load something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;PostCode,&lt;BR /&gt;if (isnum(mid(PostCode,2,1)), left(PostCode,1),Left(PostCode,2)) &lt;B&gt;as&lt;/B&gt; PostCode_Part1,&lt;BR /&gt;if(exists( [ PostCode_Part1 in the Excel file ] ),'PostCode_Part1','Other') &lt;B&gt;as&lt;/B&gt; PostCode_Part1b,&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;This is the xls load statement:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;&lt;B&gt;LOAD&lt;/B&gt; Prefix &lt;B&gt;as&lt;/B&gt; PostCode_Part1,&lt;BR /&gt;Region&lt;BR /&gt;&lt;STRONG&gt;FROM MyXLS.xls&lt;BR /&gt;&lt;/STRONG&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;This 'Other' value in PostCode_Part1b will then match with the 'Other' row in the spreadsheet which will return 'Other' as a region...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-3198_sourceID:3198" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does that make sense??? Thanks! Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jan 2011 12:28:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-an-other-for-catch-all/m-p/154825#M31305</guid>
      <dc:creator />
      <dc:date>2011-01-05T12:28:18Z</dc:date>
    </item>
    <item>
      <title>Creating an 'other' for catch-all?</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-an-other-for-catch-all/m-p/154826#M31306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello again... After taking a step back from the problem I think I might have found my own solution...&lt;/P&gt;&lt;P&gt;ApplyMap??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;&lt;I&gt;Map_Region:&lt;BR /&gt;&lt;/I&gt;&lt;B&gt;MAPPING&lt;/B&gt; &lt;B&gt;LOAD&lt;BR /&gt;&lt;/B&gt; Upper (Prefix) &lt;B&gt;as&lt;/B&gt; PostCode_Prefix,&lt;BR /&gt; Region&lt;BR /&gt;&lt;B&gt;FROM&lt;BR /&gt;&lt;BR /&gt;&lt;/B&gt;E:\QlikViewDocuments\Test\HNW_by_region\Data\Regions.xlsx&lt;BR /&gt;(ooxml, embedded labels, table is Sheet1);&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;... and then apply the map with another load statement above the orginal load:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;&lt;B&gt;LOAD&lt;BR /&gt;&lt;/B&gt; *,&lt;BR /&gt; ApplyMap('Map_Region', Upper(PostCode_Part1),'Unknown') &lt;B&gt;as&lt;/B&gt; Region;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jan 2011 13:12:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-an-other-for-catch-all/m-p/154826#M31306</guid>
      <dc:creator />
      <dc:date>2011-01-05T13:12:58Z</dc:date>
    </item>
  </channel>
</rss>

