<?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 Cleaning Dirty Data String, remove last 2 Characters and Numbers in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Cleaning-Dirty-Data-String-remove-last-2-Characters-and-Numbers/m-p/609543#M225023</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I thought I would give back some help to maybe help others.&lt;/P&gt;&lt;P&gt;I had Dirty Data in a&amp;nbsp; "Suburb"&amp;nbsp; Field which I need to clean up, I wish to use this Field&amp;nbsp; to match to another Field.&lt;/P&gt;&lt;P&gt;So far I have successfully cleaned off the Posted Code with the PurgeChar() but have been spending a few hours with no success &lt;/P&gt;&lt;P&gt;on stripping last 2 characters "SA" off.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then I worked it out &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="SubStripCode.png" class="jive-image" height="147" src="https://community.qlik.com/legacyfs/online/56709_SubStripCode.png" style="width: 786px; height: 146.99220779220778px;" width="786" /&gt;&lt;/P&gt;&lt;P&gt;By Using the Help example of&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="Code"&gt;left(Date, 4)&lt;/SPAN&gt; where &lt;SPAN class="Italic"&gt;Date&lt;/SPAN&gt; = 1997-07-14 returns &lt;SPAN class="Italic"&gt;1997&lt;/SPAN&gt;.&amp;nbsp; I used a variable in place of 4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fields Left to right with Clean up process&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Suburb.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/56710_Suburb.png" /&gt;&lt;/P&gt;&lt;P&gt;Hope it helps &lt;/P&gt;&lt;P&gt;regards Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Apr 2014 12:24:39 GMT</pubDate>
    <dc:creator>Peter_Brunner</dc:creator>
    <dc:date>2014-04-07T12:24:39Z</dc:date>
    <item>
      <title>Cleaning Dirty Data String, remove last 2 Characters and Numbers</title>
      <link>https://community.qlik.com/t5/QlikView/Cleaning-Dirty-Data-String-remove-last-2-Characters-and-Numbers/m-p/609543#M225023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I thought I would give back some help to maybe help others.&lt;/P&gt;&lt;P&gt;I had Dirty Data in a&amp;nbsp; "Suburb"&amp;nbsp; Field which I need to clean up, I wish to use this Field&amp;nbsp; to match to another Field.&lt;/P&gt;&lt;P&gt;So far I have successfully cleaned off the Posted Code with the PurgeChar() but have been spending a few hours with no success &lt;/P&gt;&lt;P&gt;on stripping last 2 characters "SA" off.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then I worked it out &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="SubStripCode.png" class="jive-image" height="147" src="https://community.qlik.com/legacyfs/online/56709_SubStripCode.png" style="width: 786px; height: 146.99220779220778px;" width="786" /&gt;&lt;/P&gt;&lt;P&gt;By Using the Help example of&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="Code"&gt;left(Date, 4)&lt;/SPAN&gt; where &lt;SPAN class="Italic"&gt;Date&lt;/SPAN&gt; = 1997-07-14 returns &lt;SPAN class="Italic"&gt;1997&lt;/SPAN&gt;.&amp;nbsp; I used a variable in place of 4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fields Left to right with Clean up process&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Suburb.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/56710_Suburb.png" /&gt;&lt;/P&gt;&lt;P&gt;Hope it helps &lt;/P&gt;&lt;P&gt;regards Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 12:24:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cleaning-Dirty-Data-String-remove-last-2-Characters-and-Numbers/m-p/609543#M225023</guid>
      <dc:creator>Peter_Brunner</dc:creator>
      <dc:date>2014-04-07T12:24:39Z</dc:date>
    </item>
  </channel>
</rss>

