<?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: Removing Trailing Characters in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Removing-Trailing-Characters/m-p/842132#M998860</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="syntax"&gt;&lt;A name="kanchor1302"&gt;&lt;/A&gt;&lt;A name="purgechar"&gt;&lt;/A&gt;&lt;SPAN class="Bold"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="syntax"&gt;&lt;SPAN class="Bold"&gt;Use purgechar function&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="syntax"&gt;&lt;SPAN class="Bold"&gt;PurgeChar(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;s1, s2&lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Returns the string &lt;SPAN class="Italic"&gt;s1&lt;/SPAN&gt; less all characters contained in string &lt;SPAN class="Italic"&gt;s2&lt;/SPAN&gt;. &lt;/P&gt;&lt;P class="example"&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;purgechar ( 'a1b2c3','123' ) &lt;/SPAN&gt;returns '&lt;SPAN class="Italic"&gt;abc&lt;/SPAN&gt;'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Jun 2015 12:46:51 GMT</pubDate>
    <dc:creator>avinashelite</dc:creator>
    <dc:date>2015-06-17T12:46:51Z</dc:date>
    <item>
      <title>Removing Trailing Characters</title>
      <link>https://community.qlik.com/t5/QlikView/Removing-Trailing-Characters/m-p/842131#M998858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I data in a field which is typically in the following pipe delimited format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Text1|||||&lt;/P&gt;&lt;P&gt;Text1|Text2|Text3|||&lt;/P&gt;&lt;P&gt;Text1|Text2||||&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to remove all the trailing pipes - however many there are&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was trying something a long the lines of this but it doesn't quite seem to work...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Mid(Field1,1,FindOneOf(Field1,'|',-1)-1)&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt; AS&amp;nbsp;&amp;nbsp;&amp;nbsp; Field1&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;Any ideas greatly appreciated&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 12:44:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Removing-Trailing-Characters/m-p/842131#M998858</guid>
      <dc:creator>haymarketpaul</dc:creator>
      <dc:date>2015-06-17T12:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Trailing Characters</title>
      <link>https://community.qlik.com/t5/QlikView/Removing-Trailing-Characters/m-p/842132#M998860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="syntax"&gt;&lt;A name="kanchor1302"&gt;&lt;/A&gt;&lt;A name="purgechar"&gt;&lt;/A&gt;&lt;SPAN class="Bold"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="syntax"&gt;&lt;SPAN class="Bold"&gt;Use purgechar function&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="syntax"&gt;&lt;SPAN class="Bold"&gt;PurgeChar(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;s1, s2&lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Returns the string &lt;SPAN class="Italic"&gt;s1&lt;/SPAN&gt; less all characters contained in string &lt;SPAN class="Italic"&gt;s2&lt;/SPAN&gt;. &lt;/P&gt;&lt;P class="example"&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;purgechar ( 'a1b2c3','123' ) &lt;/SPAN&gt;returns '&lt;SPAN class="Italic"&gt;abc&lt;/SPAN&gt;'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 12:46:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Removing-Trailing-Characters/m-p/842132#M998860</guid>
      <dc:creator>avinashelite</dc:creator>
      <dc:date>2015-06-17T12:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Trailing Characters</title>
      <link>https://community.qlik.com/t5/QlikView/Removing-Trailing-Characters/m-p/842133#M998862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Replace(Field1, '|', ' ')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 12:47:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Removing-Trailing-Characters/m-p/842133#M998862</guid>
      <dc:creator>alexandros17</dc:creator>
      <dc:date>2015-06-17T12:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Trailing Characters</title>
      <link>https://community.qlik.com/t5/QlikView/Removing-Trailing-Characters/m-p/842134#M998867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in your case &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;purgechar(fieldname,'|') as fieldname&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this should give the desired&amp;nbsp; output &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 12:48:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Removing-Trailing-Characters/m-p/842134#M998867</guid>
      <dc:creator>avinashelite</dc:creator>
      <dc:date>2015-06-17T12:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Trailing Characters</title>
      <link>https://community.qlik.com/t5/QlikView/Removing-Trailing-Characters/m-p/842135#M998868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I only want to get rid of the trailing pipes at the end - i think those 2 solutions would also affect the genuine pipes in the middle as well&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 12:49:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Removing-Trailing-Characters/m-p/842135#M998868</guid>
      <dc:creator>haymarketpaul</dc:creator>
      <dc:date>2015-06-17T12:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Trailing Characters</title>
      <link>https://community.qlik.com/t5/QlikView/Removing-Trailing-Characters/m-p/842136#M998869</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 like this&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;I would like to remove all the trailing pipes "&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD Concat(T,'|') as T1 where Len(Trim(T));&lt;/P&gt;&lt;P&gt;LOAD (SubField('Text1|Text2|Text3|||','|'))&amp;nbsp; as T AutoGenerate 1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 12:57:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Removing-Trailing-Characters/m-p/842136#M998869</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2015-06-17T12:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Trailing Characters</title>
      <link>https://community.qlik.com/t5/QlikView/Removing-Trailing-Characters/m-p/1723509#M998870</link>
      <description>&lt;P&gt;Don't know if you still have this problem, but the solution I used in Qlik Sense was this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;replace(trim(replace(Keepchar(concat(distinct SalesOrder&amp;amp;' | '), '1234567890|'), '|', ' ')), ' ', '|')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I first replaced the '|' with the space-character. Then I used Trim() to&amp;nbsp; remove the trailing spaces, and then replace to convert the spaces back to '|'. This of course only works if you have no spaces in the data to process.&lt;/P&gt;&lt;P&gt;If you have spaces, you might have to replace first to get them out of the way, and revert them back once your done.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2020 13:00:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Removing-Trailing-Characters/m-p/1723509#M998870</guid>
      <dc:creator>Lemac</dc:creator>
      <dc:date>2020-06-30T13:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Trailing Characters</title>
      <link>https://community.qlik.com/t5/QlikView/Removing-Trailing-Characters/m-p/1723624#M998872</link>
      <description>&lt;P&gt;One solution in the Script. Drop the Fields which doesn't have data.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;tab1:
LOAD * INLINE [
    Text1|||||
    Text1|Text2|Text3|||
    Text1|Text2||||
](delimiter is '|', no labels);

Set vDropFields='';
FOR i = 1 to NoOfFields('tab1')  
  LET vFieldName = FieldName($(i),'tab1');  
  LET vFieldValueCount = FieldValueCount('$(vFieldName)');    

  If $(vFieldValueCount)=1 And FieldValue('$(vFieldName)', 1)='' Then
  	Trace ***Inside;
  	Let vDropFields = '$(vDropFields)'&amp;amp;If('$(vDropFields)'&amp;lt;&amp;gt;'',',')&amp;amp;'$(vFieldName)';
  EndIf 
NEXT i  

Drop Fields $(vDropFields);&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="commQV05.PNG" style="width: 156px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/36593i7903F6997F6E9B2C/image-size/large?v=v2&amp;amp;px=999" role="button" title="commQV05.PNG" alt="commQV05.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Dropped the Fields.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="commQV06.PNG" style="width: 102px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/36594iBCF19F2CA79D55F4/image-size/large?v=v2&amp;amp;px=999" role="button" title="commQV06.PNG" alt="commQV06.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2020 16:03:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Removing-Trailing-Characters/m-p/1723624#M998872</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2020-06-30T16:03:50Z</dc:date>
    </item>
  </channel>
</rss>

