<?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 How to remove first 4 characters from the data in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-remove-first-4-characters-from-the-data/m-p/524719#M1120313</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to remove first 3 digits and hiphen(-) from the below data. Could anyone explain me how to do it. I tried many functions like index and all but not getting the desired result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="BA.JPG" class="jive-image" src="https://community.qlik.com/legacyfs/online/51659_BA.JPG" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Jan 2014 08:09:33 GMT</pubDate>
    <dc:creator>farheenayesha</dc:creator>
    <dc:date>2014-01-17T08:09:33Z</dc:date>
    <item>
      <title>How to remove first 4 characters from the data</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-remove-first-4-characters-from-the-data/m-p/524719#M1120313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to remove first 3 digits and hiphen(-) from the below data. Could anyone explain me how to do it. I tried many functions like index and all but not getting the desired result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="BA.JPG" class="jive-image" src="https://community.qlik.com/legacyfs/online/51659_BA.JPG" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 08:09:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-remove-first-4-characters-from-the-data/m-p/524719#M1120313</guid>
      <dc:creator>farheenayesha</dc:creator>
      <dc:date>2014-01-17T08:09:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove first 4 characters from the data</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-remove-first-4-characters-from-the-data/m-p/524720#M1120314</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;Try Mid()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Mid('021-BioProcess', 5)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 08:36:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-remove-first-4-characters-from-the-data/m-p/524720#M1120314</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-01-17T08:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove first 4 characters from the data</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-remove-first-4-characters-from-the-data/m-p/524721#M1120315</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;If you need to remove the first 4 characters, you may use a function like mid():&lt;/P&gt;&lt;P&gt;mid('abcdefghiljk' 3) will return cdefghijk&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem you are facing is that there is not always 4 charcaters to remove. It depends on the hyphen=&amp;gt; you will need to test. You will use another string function: index() that retruns an integer (0 if it does not find), FindOneOf() ....&lt;/P&gt;&lt;P&gt;index('abcdef' 'ef') will return 5&lt;/P&gt;&lt;P&gt;index('abcdef' 'x') will return 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, you need to mix all that.&lt;/P&gt;&lt;P&gt;In the LOAD&lt;/P&gt;&lt;P&gt;LOAD [...]&lt;/P&gt;&lt;P&gt;if(index(FiledName '-')=0, FieldName, mid(Fieldname, 4)) as sth&lt;BR /&gt;FROM [...]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In an expression in the GUI, you could write the same as above also if your fieldname contains too many characters you want to remove.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fabrice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 08:39:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-remove-first-4-characters-from-the-data/m-p/524721#M1120315</guid>
      <dc:creator />
      <dc:date>2014-01-17T08:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove first 4 characters from the data</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-remove-first-4-characters-from-the-data/m-p/524722#M1120316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ayesha,&lt;/P&gt;&lt;P&gt;I think In the load you could try something like :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(mid(Business,4)='-',mid(Business,5),Business) as Business2&lt;/P&gt;&lt;P&gt;That checks if 4 chacter is - and if it is then will trim out first 4 digits otherwise will leave as it to accommodate for the values that do not have numbers, like"Catch All" etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 08:42:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-remove-first-4-characters-from-the-data/m-p/524722#M1120316</guid>
      <dc:creator />
      <dc:date>2014-01-17T08:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove first 4 characters from the data</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-remove-first-4-characters-from-the-data/m-p/524723#M1120317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can use this expression :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;PurgeChar&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;PurgeChar&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;test&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;TextBetween&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;test&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,'','-')),'-') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Instead of test use your field.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;HTH&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;-Shruti&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 08:45:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-remove-first-4-characters-from-the-data/m-p/524723#M1120317</guid>
      <dc:creator />
      <dc:date>2014-01-17T08:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove first 4 characters from the data</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-remove-first-4-characters-from-the-data/m-p/524724#M1120318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you everyone for all your replies..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 09:06:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-remove-first-4-characters-from-the-data/m-p/524724#M1120318</guid>
      <dc:creator>farheenayesha</dc:creator>
      <dc:date>2014-01-17T09:06:07Z</dc:date>
    </item>
  </channel>
</rss>

