<?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: trim function not working properly in my application in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/trim-function-not-working-properly-in-my-application/m-p/267244#M100343</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;You can use subfield&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;say party name is xx&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; yy&amp;nbsp;&amp;nbsp; zzz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you write subfield(party, ' ', 1) &amp;amp; ' ' &amp;amp; subfield(partym ' ', 2) as par&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then you get xx yy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but more no of subfields may be required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reg,&lt;/P&gt;&lt;P&gt;Shubhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Sep 2011 11:01:13 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-09-16T11:01:13Z</dc:date>
    <item>
      <title>trim function not working properly in my application</title>
      <link>https://community.qlik.com/t5/QlikView/trim-function-not-working-properly-in-my-application/m-p/267239#M100338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi community ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am facing difficulty in trim function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have PartyColumn in my Pivot Report&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PartyName:&lt;/P&gt;&lt;P&gt;Franklin&amp;nbsp;&amp;nbsp;&amp;nbsp; Investments&amp;nbsp;&amp;nbsp; ABC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used trim function &lt;/P&gt;&lt;P&gt;trim(PartyName)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But still i am getting same output with spaces between names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried using ltrim,rtrim but am getting same output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the contrary if i used the same function in excel trim.It is working&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Required this on urgent basi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As the column PartyName is having 4000 records&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it is becoming extremely difficult for me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Though temporary i have done it in excel and created a table and then reimported it into my qvw but wantedto know why QV can't do it if excel can do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2011 06:22:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/trim-function-not-working-properly-in-my-application/m-p/267239#M100338</guid>
      <dc:creator>rajtechnocraft</dc:creator>
      <dc:date>2011-09-16T06:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: trim function not working properly in my application</title>
      <link>https://community.qlik.com/t5/QlikView/trim-function-not-working-properly-in-my-application/m-p/267240#M100339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Raj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this function : REPLACE(PartyName,' ','') &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if this one help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sokkorn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2011 06:44:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/trim-function-not-working-properly-in-my-application/m-p/267240#M100339</guid>
      <dc:creator>Sokkorn</dc:creator>
      <dc:date>2011-09-16T06:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: trim function not working properly in my application</title>
      <link>https://community.qlik.com/t5/QlikView/trim-function-not-working-properly-in-my-application/m-p/267241#M100340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raj&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QlikViews trim function does not do what you want to do because it's not designed that way.&lt;/P&gt;&lt;P&gt;From the QV help (F1):&lt;/P&gt;&lt;H4&gt;trim(&lt;SPAN style="font-style: italic;"&gt;s &lt;/SPAN&gt;&lt;SPAN style="font-style: normal;"&gt;)&lt;/SPAN&gt;&lt;/H4&gt;&lt;P&gt;&lt;SPAN style="font-style: normal;"&gt;Returns the string &lt;/SPAN&gt;&lt;SPAN style="font-style: italic;"&gt;s &lt;/SPAN&gt;&lt;SPAN style="font-style: normal;"&gt;trimmed of any &lt;SPAN style="text-decoration: underline;"&gt;leading &lt;/SPAN&gt;and &lt;SPAN style="text-decoration: underline;"&gt;trailing &lt;/SPAN&gt;spaces.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style: normal;"&gt;And I don't think Sokkorns suggestion gives what you want beacuse &lt;/SPAN&gt;REPLACE(PartyName,' ','') will completetly remove all spaces in PartyName.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I think you could use REPLACE(PartyName,'&amp;nbsp; ',' ') (that is replacing two spaces with one space) in a loop of some kind (as long as there are PartyNames = '*&amp;nbsp; *')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/gg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2011 07:58:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/trim-function-not-working-properly-in-my-application/m-p/267241#M100340</guid>
      <dc:creator>gandalfgray</dc:creator>
      <dc:date>2011-09-16T07:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: trim function not working properly in my application</title>
      <link>https://community.qlik.com/t5/QlikView/trim-function-not-working-properly-in-my-application/m-p/267242#M100341</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;in &lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.qlikfix.com/2010/10/18/regular-expressions-in-the-load-script/"&gt;http://www.qlikfix.com/2010/10/18/regular-expressions-in-the-load-script/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;are explained how to use regular expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the reugular expression &lt;/P&gt;&lt;P&gt;" {2,}"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ( space{2,} )&lt;/P&gt;&lt;P&gt;can you search all places with two or more spaces. Replace it with &lt;STRONG&gt;RegExReplace &lt;/STRONG&gt;with one space. Finally a trim for leading and tailing space and that`s it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2011 08:18:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/trim-function-not-working-properly-in-my-application/m-p/267242#M100341</guid>
      <dc:creator />
      <dc:date>2011-09-16T08:18:32Z</dc:date>
    </item>
    <item>
      <title>trim function not working properly in my application</title>
      <link>https://community.qlik.com/t5/QlikView/trim-function-not-working-properly-in-my-application/m-p/267243#M100342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; thanks a lot.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2011 10:32:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/trim-function-not-working-properly-in-my-application/m-p/267243#M100342</guid>
      <dc:creator>rajtechnocraft</dc:creator>
      <dc:date>2011-09-16T10:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: trim function not working properly in my application</title>
      <link>https://community.qlik.com/t5/QlikView/trim-function-not-working-properly-in-my-application/m-p/267244#M100343</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;You can use subfield&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;say party name is xx&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; yy&amp;nbsp;&amp;nbsp; zzz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you write subfield(party, ' ', 1) &amp;amp; ' ' &amp;amp; subfield(partym ' ', 2) as par&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then you get xx yy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but more no of subfields may be required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reg,&lt;/P&gt;&lt;P&gt;Shubhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2011 11:01:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/trim-function-not-working-properly-in-my-application/m-p/267244#M100343</guid>
      <dc:creator />
      <dc:date>2011-09-16T11:01:13Z</dc:date>
    </item>
    <item>
      <title>trim function not working properly in my application</title>
      <link>https://community.qlik.com/t5/QlikView/trim-function-not-working-properly-in-my-application/m-p/267245#M100344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you don't want to use external functions you can either you brake it down and rebuild like &lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" href="https://community.qlik.com/people/shubhu007" id="jive-368314604944447474799"&gt;shubhu007&lt;/A&gt; suggested or you can do a "fast fix". The fix could look something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;replace(replace(replace(replace(replace(replace(replace(replace(trim(PartyName),'&amp;nbsp; ',' '),'&amp;nbsp; ',' '),'&amp;nbsp; ',' '),'&amp;nbsp; ',' '),'&amp;nbsp; ',' '),'&amp;nbsp; ',' '),'&amp;nbsp; ',' '),'&amp;nbsp; ',' ') as PartyName&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This example should reduce up to 256 spaces (2 ^ &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; in a row to a single space. If you have more spaces in a row just add a few more replace() and you should be fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Nils&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2011 11:52:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/trim-function-not-working-properly-in-my-application/m-p/267245#M100344</guid>
      <dc:creator />
      <dc:date>2011-09-16T11:52:36Z</dc:date>
    </item>
  </channel>
</rss>

