<?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: Need quick help on string manipulation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-quick-help-on-string-manipulation/m-p/48774#M769020</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;one solution might be:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_305347_Pic1.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/205667_QlikCommunity_Thread_305347_Pic1.JPG" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_15294411382736080 jive_text_macro" jivemacro_uid="_15294411382736080"&gt;
&lt;P&gt;table1:&lt;/P&gt;
&lt;P&gt;LOAD *,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Left(PartNumber,FindOneOf(PartNumber&amp;amp;'P','PG')-1) as SubstringBeforePorG&lt;/P&gt;
&lt;P&gt;Inline [&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PartNumber&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 41B541600APP9&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 156B6202CGP36G&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12A103598P3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12345ABC678DEF9&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Jun 2018 20:45:56 GMT</pubDate>
    <dc:creator>MarcoWedel</dc:creator>
    <dc:date>2018-06-19T20:45:56Z</dc:date>
    <item>
      <title>Need quick help on string manipulation</title>
      <link>https://community.qlik.com/t5/QlikView/Need-quick-help-on-string-manipulation/m-p/48769#M769015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am new to qlik, so i would be needing help on a string manipulation in load script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a column in my table named "Part Number" which has values like '&lt;SPAN style="color: #272a34; font-family: opensansregular; font-size: 13px; background-color: #f8f8f8;"&gt;41B541600APP9&lt;/SPAN&gt;','&lt;SPAN style="color: #272a34; font-family: opensansregular; font-size: 13px; background-color: #f8f8f8;"&gt;156B6202CGP36G&lt;/SPAN&gt;','&lt;SPAN style="color: #272a34; font-family: opensansregular; font-size: 13px; background-color: #f8f8f8;"&gt;12A103598P3&lt;/SPAN&gt;'. I want to get the substring before the occurence of P or G from right. &lt;/P&gt;&lt;P&gt;I have used following nested if to achieve this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;((&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Index&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PartNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,'P',-1)&amp;lt;&amp;gt;-1),&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;mid&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PartNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,1,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Index&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PartNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,'P',1)-1),&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;((&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Index&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PartNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,'G',-1)&amp;lt;&amp;gt;-1),&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;mid&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PartNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,1,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Index&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PartNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,'G',-1)-1),&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PartNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it is working only for P but not for G. Could anyone help me to solve this issue? &lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Praveen Prabhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-quick-help-on-string-manipulation/m-p/48769#M769015</guid>
      <dc:creator>praveensprabhu</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Need quick help on string manipulation</title>
      <link>https://community.qlik.com/t5/QlikView/Need-quick-help-on-string-manipulation/m-p/48770#M769016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The three codes you have, are all from one row of data? What would be the expected output for the data that you have shared?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2018 16:44:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-quick-help-on-string-manipulation/m-p/48770#M769016</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-06-19T16:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: Need quick help on string manipulation</title>
      <link>https://community.qlik.com/t5/QlikView/Need-quick-help-on-string-manipulation/m-p/48771#M769017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sunny, &lt;/P&gt;&lt;P&gt; No the part numbers are 3 separate rows but in a single column... My exected output wud b 41B541600A, 156B6202CG, 12A103598..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2018 17:01:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-quick-help-on-string-manipulation/m-p/48771#M769017</guid>
      <dc:creator>praveensprabhu</dc:creator>
      <dc:date>2018-06-19T17:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: Need quick help on string manipulation</title>
      <link>https://community.qlik.com/t5/QlikView/Need-quick-help-on-string-manipulation/m-p/48772#M769018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Left(PartNumber, RangeMin(If(Index(PartNumber, 'P') = 0, Len(PartNumber), Index(PartNumber, 'P')), If(Index(PartNumber, 'G') = 0, Len(PartNumber), Index(PartNumber, 'G')))-1) as PartNumber,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only thing I don't understand is why the second part is &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;156B6202CG and not &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;156B6202C? Because G comes before P, so, it should stop before G, right?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2018 17:44:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-quick-help-on-string-manipulation/m-p/48772#M769018</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-06-19T17:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Need quick help on string manipulation</title>
      <link>https://community.qlik.com/t5/QlikView/Need-quick-help-on-string-manipulation/m-p/48773#M769019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes it should be...by mistake i typed it..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2018 17:50:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-quick-help-on-string-manipulation/m-p/48773#M769019</guid>
      <dc:creator>praveensprabhu</dc:creator>
      <dc:date>2018-06-19T17:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: Need quick help on string manipulation</title>
      <link>https://community.qlik.com/t5/QlikView/Need-quick-help-on-string-manipulation/m-p/48774#M769020</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;one solution might be:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_305347_Pic1.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/205667_QlikCommunity_Thread_305347_Pic1.JPG" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_15294411382736080 jive_text_macro" jivemacro_uid="_15294411382736080"&gt;
&lt;P&gt;table1:&lt;/P&gt;
&lt;P&gt;LOAD *,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Left(PartNumber,FindOneOf(PartNumber&amp;amp;'P','PG')-1) as SubstringBeforePorG&lt;/P&gt;
&lt;P&gt;Inline [&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PartNumber&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 41B541600APP9&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 156B6202CGP36G&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12A103598P3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12345ABC678DEF9&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2018 20:45:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-quick-help-on-string-manipulation/m-p/48774#M769020</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2018-06-19T20:45:56Z</dc:date>
    </item>
  </channel>
</rss>

