<?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: Create mapping table using substrings in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831376#M660331</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Joe's use of interval match is a good idea and it was something I overlooked &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use this if you want to use a for &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CIB:&lt;/P&gt;&lt;P&gt;LOAD NUM(CIB,0000) AS CIB,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F2&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[..\sample data set.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is [CIB CODES]);&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;TEMP:&lt;/P&gt;&lt;P&gt;LOAD ATB, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Compatible ATB Codes]&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[..\sample data set.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is [ATB Codes]);&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;&lt;/P&gt;&lt;P&gt;let vATBValuesCount= FieldValueCount('ATB');&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;for ATBCounter = 1 to $(vATBValuesCount) &lt;/P&gt;&lt;P&gt;&amp;nbsp; let vATBCode = FieldValue('Compatible ATB Codes',$(ATBCounter));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; for vATBCodeCounter = 1 to (SubStringCount(FieldValue('Compatible ATB Codes',$(ATBCounter)),','))+1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; let vATBValue = SubField('$(vATBCode)',',',$(vATBCodeCounter));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if index($(vATBValue), '-') &amp;gt; 0 then&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;&amp;nbsp; for RangerCounter = SubField('$(vATBValue)','-',1) to&amp;nbsp; SubField('$(vATBValue)','-',2);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ATB:&lt;/P&gt;&lt;P&gt;&amp;nbsp; load&lt;/P&gt;&lt;P&gt;&amp;nbsp; ATB,&lt;/P&gt;&lt;P&gt;&amp;nbsp; NUM($(RangerCounter),0000) as CIB&lt;/P&gt;&lt;P&gt;&amp;nbsp; Resident TEMP;&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;&amp;nbsp; next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ELSE &lt;/P&gt;&lt;P&gt;&amp;nbsp; ATB:&lt;/P&gt;&lt;P&gt;&amp;nbsp; load&lt;/P&gt;&lt;P&gt;&amp;nbsp; ATB,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NUM($(RangerCounter),0000) as CIB&lt;/P&gt;&lt;P&gt;&amp;nbsp; Resident TEMP;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ENDIF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; NEXT&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;NEXT&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;&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;LEFT JOIN(ATB)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;Resident CIB;&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 TABLES CIB;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Mar 2015 17:26:58 GMT</pubDate>
    <dc:creator>ramoncova06</dc:creator>
    <dc:date>2015-03-31T17:26:58Z</dc:date>
    <item>
      <title>Create mapping table using substrings</title>
      <link>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831360#M660315</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 data in the following formats:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are roughly 50 ATB codes&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); 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;&lt;STRONG&gt;ATB Code&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Description&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Compatible CIB Codes&lt;/STRONG&gt;&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;Central&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0111-6423, 7012-7018, 6603&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;Local&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0111-6423, 7012-7018&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are roughly 500 CIB Codes&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); 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;&lt;STRONG&gt;CIB Codes&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Desc&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;0111&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Desc 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;0112&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Desc 2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;0123&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Desc 3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;0124&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Desc 4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to create a row based table of acceptable ATB and CIB combinations that would end up in this format:-&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); 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;&lt;STRONG&gt;ATB Code&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;CIB Codes&lt;/STRONG&gt;&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;0111&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0112&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0123&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0124&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this doable using Qlikview? If so what script commands would one use?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Stuart&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2015 14:51:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831360#M660315</guid>
      <dc:creator />
      <dc:date>2015-03-31T14:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: Create mapping table using substrings</title>
      <link>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831361#M660316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H1&gt;&lt;A name="kanchor832"&gt;&lt;/A&gt;Mapping Functions&lt;/H1&gt;&lt;P&gt;The &lt;SPAN class="Bold"&gt;ApplyMap&lt;/SPAN&gt; function is used for mapping any expression to a previously loaded mapping table. The syntax is:&lt;/P&gt;&lt;P class="syntax"&gt;&lt;A name="kanchor833"&gt;&lt;/A&gt;&lt;A name="applymap"&gt;&lt;/A&gt;&lt;SPAN class="Bold"&gt;applymap(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;'mapname', expr [ , defaultexpr ] &lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;where:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Italic"&gt;mapname&lt;/SPAN&gt; is the name of a mapping table that has previously been created through the &lt;SPAN class="Bold"&gt;mapping load&lt;/SPAN&gt; or the &lt;SPAN class="Bold"&gt;mapping select&lt;/SPAN&gt; statement (see &lt;A class="MCXref_0"&gt;&lt;EM&gt;Mapping&lt;/EM&gt;&lt;/A&gt;). Its name must be enclosed by single, straight &lt;A class="MCXref_0"&gt;&lt;EM&gt;Quotation Marks in Scripting&lt;/EM&gt;&lt;/A&gt;. &lt;/P&gt;&lt;P&gt;&lt;SPAN class="Italic"&gt;expr&lt;/SPAN&gt; is the expression, the result of which should be mapped. &lt;/P&gt;&lt;P&gt;&lt;SPAN class="Italic"&gt;defaultexpr&lt;/SPAN&gt; is an optional expression which will be used as a default mapping value if the mapping table does not contain a matching value for &lt;SPAN class="Italic"&gt;expr&lt;/SPAN&gt;. If no default value is given, the value of &lt;SPAN class="Italic"&gt;expr&lt;/SPAN&gt; will be returned as is. &lt;/P&gt;&lt;P class="example"&gt;Examples:&lt;/P&gt;&lt;P class="Code"&gt;// Assume the following mapping table: &lt;/P&gt;&lt;P class="Code"&gt;map1: &lt;/P&gt;&lt;P class="Code"&gt;mapping load * inline [ &lt;/P&gt;&lt;P class="Code"&gt;x, y &lt;/P&gt;&lt;P class="Code"&gt;1, one &lt;/P&gt;&lt;P class="Code"&gt;2, two &lt;/P&gt;&lt;P class="Code"&gt;3, three ] ; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;ApplyMap ('map1', 2 )&lt;/SPAN&gt; returns ' two'&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;ApplyMap ('map1', 4 )&lt;/SPAN&gt; returns 4&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;ApplyMap ('map1', 5, 'xxx')&lt;/SPAN&gt; returns 'xxx'&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;ApplyMap ('map1', 1, 'xxx')&lt;/SPAN&gt; returns 'one'&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;ApplyMap ('map1', 5, null( ) )&lt;/SPAN&gt; returns NULL&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;ApplyMap ('map1', 3, null( ) )&lt;/SPAN&gt; returns 'three'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The &lt;SPAN class="Bold"&gt;MapSubstring&lt;/SPAN&gt; function is used to map parts of any expression to a previously loaded mapping table. The mapping is case sensitive and non-iterative and substrings are mapped from left to right. The syntax is:&lt;/P&gt;&lt;P class="syntax"&gt;&lt;A name="kanchor834"&gt;&lt;/A&gt;&lt;A name="mapsubstring"&gt;&lt;/A&gt;&lt;SPAN class="Bold"&gt;mapsubstring(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;'mapname', expr&lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;This function can be used for mapping parts of any expression on a previously loaded mapping table. The mapping is case sensitive and non-recursive. The substrings are mapped from the left to the right. &lt;SPAN class="Italic"&gt;Mapname&lt;/SPAN&gt; is the name of a mapping table previously read by a &lt;SPAN class="Bold"&gt;mapping load&lt;/SPAN&gt; or a &lt;SPAN class="Bold"&gt;mapping select&lt;/SPAN&gt; statement (see &lt;A class="MCXref_0"&gt;&lt;EM&gt;Mapping&lt;/EM&gt;&lt;/A&gt;). The name must be enclosed by single straight quotation marks. &lt;SPAN class="Italic"&gt;Expr&lt;/SPAN&gt; is the expression whose result should be mapped by substrings. &lt;/P&gt;&lt;P class="example"&gt;Examples:&lt;/P&gt;&lt;P class="Code"&gt;// Assume the following mapping table: &lt;/P&gt;&lt;P class="Code"&gt;map1: &lt;/P&gt;&lt;P class="Code"&gt;mapping load * inline [ &lt;/P&gt;&lt;P class="Code"&gt;x, y &lt;/P&gt;&lt;P class="Code"&gt;1, &amp;lt;one&amp;gt; &lt;/P&gt;&lt;P class="Code"&gt;aa, XYZ &lt;/P&gt;&lt;P class="Code"&gt;x, b ] ; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;MapSubstring ('map1', 'A123')&lt;/SPAN&gt; returns 'A&amp;lt;one&amp;gt;23'&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;MapSubstring ('map1', 'baaar')&lt;/SPAN&gt; returns 'bXYZar'&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;MapSubstring ('map1', 'xaa1')&lt;/SPAN&gt; returns 'bXYZ&amp;lt;one&amp;gt;'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #808080;"&gt;&lt;SPAN class="PrimaryQVRelease"&gt;QlikView 11.20 SR6&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2015 14:54:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831361#M660316</guid>
      <dc:creator>ramoncova06</dc:creator>
      <dc:date>2015-03-31T14:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: Create mapping table using substrings</title>
      <link>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831362#M660317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stuart,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you just need to have data from table to be linked with all the&amp;nbsp; data from table 2 then concatenate would do, But what the mapping for 2 here? I.e how you identify 1 showed be linked with 0111,0112,0113 etc ?? and even 2 data show be linked with the &lt;SPAN style="font-size: 13.3333330154419px;"&gt;0111,0112,0113 etc? if that is the case then simply concatenate or if their is any condition please specify that mapping condition &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2015 15:01:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831362#M660317</guid>
      <dc:creator>avinashelite</dc:creator>
      <dc:date>2015-03-31T15:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Create mapping table using substrings</title>
      <link>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831363#M660318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Avinash that is the part I am struggling with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have one text string that says ATB 1 is allowed to use CIB codes &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;0111-6423.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Within the range 0111-6423 there are actually 290 CIB codes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The target, for example,&amp;nbsp; is to create the mapping table with 290 lines for ATB 1 &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2015 15:04:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831363#M660318</guid>
      <dc:creator />
      <dc:date>2015-03-31T15:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: Create mapping table using substrings</title>
      <link>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831364#M660319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you share a sample data set, you could probably apply an if condition checking if the mapping exists or not &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2015 15:08:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831364#M660319</guid>
      <dc:creator>ramoncova06</dc:creator>
      <dc:date>2015-03-31T15:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: Create mapping table using substrings</title>
      <link>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831365#M660320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IF you simple need to have create column for the records in CIB code then just use concatenate between those to tables that will create a row for each record in the ATB with a record in the CIB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solve's the problem &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2015 15:08:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831365#M660320</guid>
      <dc:creator>avinashelite</dc:creator>
      <dc:date>2015-03-31T15:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: Create mapping table using substrings</title>
      <link>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831366#M660321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have attached a sample dummy data set&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2015 15:13:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831366#M660321</guid>
      <dc:creator />
      <dc:date>2015-03-31T15:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: Create mapping table using substrings</title>
      <link>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831367#M660322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;did you tired with concatenation &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2015 15:15:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831367#M660322</guid>
      <dc:creator>avinashelite</dc:creator>
      <dc:date>2015-03-31T15:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: Create mapping table using substrings</title>
      <link>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831368#M660323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I cant see how that will work as I need to get the table in the following format:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;THEAD style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TH class="header" style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center; color: #ffffff; background-color: #6690bc; background-position: no-repeat no-repeat;" valign="middle"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;ATB Code&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH class="header" style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center; color: #ffffff; background-color: #6690bc; background-position: no-repeat no-repeat;" valign="middle"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;CIB Codes&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;1&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;0111&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;1&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;0112&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;1&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;0123&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;1&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;0124&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2015 15:17:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831368#M660323</guid>
      <dc:creator />
      <dc:date>2015-03-31T15:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: Create mapping table using substrings</title>
      <link>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831369#M660324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&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;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; _ATB:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ATB&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Compatible ATB Codes]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;SubStringCount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Compatible ATB Codes]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, ',') + 1 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Subfields&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; [sample data set.xlsx]&lt;BR /&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;ooxml&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;embedded&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;labels&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; [ATB Codes]);&lt;BR /&gt; &lt;BR /&gt; MaxSubfields:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Subfields&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;maxSubfields&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;RESIDENT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; _ATB;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Let&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vMaxSubfields&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('maxSubfields', -1);&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;DROP&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;TABLE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; MaxSubfields;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;for&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;n&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = 1 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;to&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;vMaxSubfields&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;TRACE&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(n)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt; &lt;BR /&gt; ATB:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ATB&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Subfield&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Compatible ATB Codes]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, ',', &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(n)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CompatibleATBCode&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(n)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;loop&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;RESIDENT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; _ATB&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;WHERE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(n)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Subfields&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; ;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;next&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;n&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;DROP&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;TABLE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; _ATB; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2015 15:31:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831369#M660324</guid>
      <dc:creator>marcus_malinow</dc:creator>
      <dc:date>2015-03-31T15:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: Create mapping table using substrings</title>
      <link>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831370#M660325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh sorry , I got you problem now&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; let me work on this &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2015 15:33:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831370#M660325</guid>
      <dc:creator>avinashelite</dc:creator>
      <dc:date>2015-03-31T15:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: Create mapping table using substrings</title>
      <link>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831371#M660326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;left join would work better with what you need, since I am assuming that you want ATB Code 1 and ATB Code 2 to be associated with the CIB Codes regardless if they were already populated or no and mapping will only add the first value found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are all your Compatible ATB Codes in that format ? &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;If so then you will need a for to create the data for each range &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2015 15:37:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831371#M660326</guid>
      <dc:creator>ramoncova06</dc:creator>
      <dc:date>2015-03-31T15:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: Create mapping table using substrings</title>
      <link>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831372#M660327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is an interesting one &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/laugh.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code has correctly split out the ranges onto lines but it needs to go one step further.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So instead of showing:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/82530_pastedImage_2.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We would see:-&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/82531_pastedImage_5.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2015 15:42:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831372#M660327</guid>
      <dc:creator />
      <dc:date>2015-03-31T15:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Create mapping table using substrings</title>
      <link>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831373#M660328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok then instead of&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Subfield&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Compatible ATB Codes]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, ',', &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;$(n)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CompatibleATBCode&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Subfield(Subfield&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Compatible ATB Codes]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, ',', &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;$(n)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;), '-', 1) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CompatibleATBCode&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2015 15:43:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831373#M660328</guid>
      <dc:creator>marcus_malinow</dc:creator>
      <dc:date>2015-03-31T15:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Create mapping table using substrings</title>
      <link>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831374#M660329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes it is possible:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;T1:&lt;/P&gt;&lt;P&gt;LOAD *&amp;nbsp; INLINE [&lt;/P&gt;&lt;P&gt;ATBCode&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CompCIBCode&lt;/P&gt;&lt;P&gt;1, '01-20, 30-39'&lt;/P&gt;&lt;P&gt;2, '10-15, 20-29'&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T2:&lt;/P&gt;&lt;P&gt;Load ATBCode,&lt;/P&gt;&lt;P&gt;trim(SubField(CompCIBCode,',')) as CompCIBCode1&lt;/P&gt;&lt;P&gt;Resident T1;&lt;/P&gt;&lt;P&gt;DROP Table T1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T3:&lt;/P&gt;&lt;P&gt;load ATBCode,&lt;/P&gt;&lt;P&gt;SubField(CompCIBCode1,'-',1) as Start, subField(CompCIBCode1,'-',2) as End&lt;/P&gt;&lt;P&gt;Resident T2;&lt;/P&gt;&lt;P&gt;DROP table T2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for i=0 to NoOfRows('T3')&lt;/P&gt;&lt;P&gt;let vStart=num#(Peek('Start',$(i),'T3'),'#');&lt;/P&gt;&lt;P&gt;let vEnd=num#(peek('End',$(i),'T3'),'#');&lt;/P&gt;&lt;P&gt;Let vATBCode=Peek('ATBCode',$(i),'T3');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; for j= '$(vStart)' to '$(vEnd)'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; T4:&lt;/P&gt;&lt;P&gt;&amp;nbsp; load '$(vATBCode)' as ATBCode,&lt;/P&gt;&lt;P&gt;&amp;nbsp; '$(j)' as CIBCode&lt;/P&gt;&lt;P&gt;&amp;nbsp; AutoGenerate 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; next;&lt;/P&gt;&lt;P&gt;next;&lt;/P&gt;&lt;P&gt;drop Table T3;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2015 16:15:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831374#M660329</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-31T16:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: Create mapping table using substrings</title>
      <link>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831375#M660330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stuart,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the attached should do what you are looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2015 16:39:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831375#M660330</guid>
      <dc:creator />
      <dc:date>2015-03-31T16:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create mapping table using substrings</title>
      <link>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831376#M660331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Joe's use of interval match is a good idea and it was something I overlooked &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use this if you want to use a for &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CIB:&lt;/P&gt;&lt;P&gt;LOAD NUM(CIB,0000) AS CIB,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F2&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[..\sample data set.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is [CIB CODES]);&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;TEMP:&lt;/P&gt;&lt;P&gt;LOAD ATB, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Compatible ATB Codes]&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[..\sample data set.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is [ATB Codes]);&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;&lt;/P&gt;&lt;P&gt;let vATBValuesCount= FieldValueCount('ATB');&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;for ATBCounter = 1 to $(vATBValuesCount) &lt;/P&gt;&lt;P&gt;&amp;nbsp; let vATBCode = FieldValue('Compatible ATB Codes',$(ATBCounter));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; for vATBCodeCounter = 1 to (SubStringCount(FieldValue('Compatible ATB Codes',$(ATBCounter)),','))+1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; let vATBValue = SubField('$(vATBCode)',',',$(vATBCodeCounter));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if index($(vATBValue), '-') &amp;gt; 0 then&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;&amp;nbsp; for RangerCounter = SubField('$(vATBValue)','-',1) to&amp;nbsp; SubField('$(vATBValue)','-',2);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ATB:&lt;/P&gt;&lt;P&gt;&amp;nbsp; load&lt;/P&gt;&lt;P&gt;&amp;nbsp; ATB,&lt;/P&gt;&lt;P&gt;&amp;nbsp; NUM($(RangerCounter),0000) as CIB&lt;/P&gt;&lt;P&gt;&amp;nbsp; Resident TEMP;&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;&amp;nbsp; next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ELSE &lt;/P&gt;&lt;P&gt;&amp;nbsp; ATB:&lt;/P&gt;&lt;P&gt;&amp;nbsp; load&lt;/P&gt;&lt;P&gt;&amp;nbsp; ATB,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NUM($(RangerCounter),0000) as CIB&lt;/P&gt;&lt;P&gt;&amp;nbsp; Resident TEMP;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ENDIF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; NEXT&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;NEXT&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;&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;LEFT JOIN(ATB)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;Resident CIB;&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 TABLES CIB;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2015 17:26:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831376#M660331</guid>
      <dc:creator>ramoncova06</dc:creator>
      <dc:date>2015-03-31T17:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: Create mapping table using substrings</title>
      <link>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831377#M660332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;multiple ways to do this really Ramon no worries &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; both ways work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2015 08:01:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831377#M660332</guid>
      <dc:creator />
      <dc:date>2015-04-01T08:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: Create mapping table using substrings</title>
      <link>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831378#M660334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It does - thanks very much to you and everyone else for the help. Such a great community !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2015 08:26:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-mapping-table-using-substrings/m-p/831378#M660334</guid>
      <dc:creator />
      <dc:date>2015-04-01T08:26:13Z</dc:date>
    </item>
  </channel>
</rss>

