<?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 Separate string into two fields with delimiter in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Separate-string-into-two-fields-with-delimiter/m-p/1361549#M515382</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to separate a field into 2 different fields where my delimiter is '-' although there are a bunch of them on the text.&lt;/P&gt;&lt;P&gt;I tryied the SubField function but it gets only the string before the next delimiter. For eg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My text is (delimiter in bold red):&lt;/P&gt;&lt;P&gt;G820 - CNHi Comercio de Pecas Ltda&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style=": ; font-size: 14pt;"&gt;-&lt;/STRONG&gt;&lt;/SPAN&gt;TRADE RECEIVABLES NACIONAL-ALL PC-ALL TP-GRP----0L--&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Trying to get:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;G820 - CNHi Comercio de Pecas Ltda&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;and&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;TRADE RECEIVABLES NACIONAL-ALL PC-ALL TP-GRP&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;SubField(Myfield,3) gets only '&lt;SPAN style="font-size: 13.3333px;"&gt;TRADE RECEIVABLES NACIONAL'&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Note that the first bit of the string and the last vary, so I cannot use the Index function searching for a string.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 May 2017 12:48:52 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-05-17T12:48:52Z</dc:date>
    <item>
      <title>Separate string into two fields with delimiter</title>
      <link>https://community.qlik.com/t5/QlikView/Separate-string-into-two-fields-with-delimiter/m-p/1361549#M515382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to separate a field into 2 different fields where my delimiter is '-' although there are a bunch of them on the text.&lt;/P&gt;&lt;P&gt;I tryied the SubField function but it gets only the string before the next delimiter. For eg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My text is (delimiter in bold red):&lt;/P&gt;&lt;P&gt;G820 - CNHi Comercio de Pecas Ltda&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style=": ; font-size: 14pt;"&gt;-&lt;/STRONG&gt;&lt;/SPAN&gt;TRADE RECEIVABLES NACIONAL-ALL PC-ALL TP-GRP----0L--&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Trying to get:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;G820 - CNHi Comercio de Pecas Ltda&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;and&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;TRADE RECEIVABLES NACIONAL-ALL PC-ALL TP-GRP&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;SubField(Myfield,3) gets only '&lt;SPAN style="font-size: 13.3333px;"&gt;TRADE RECEIVABLES NACIONAL'&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Note that the first bit of the string and the last vary, so I cannot use the Index function searching for a string.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2017 12:48:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separate-string-into-two-fields-with-delimiter/m-p/1361549#M515382</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-17T12:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: Separate string into two fields with delimiter</title>
      <link>https://community.qlik.com/t5/QlikView/Separate-string-into-two-fields-with-delimiter/m-p/1361550#M515383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Claudio&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its hard to answer without knowing exactly how your data is formatted.&lt;/P&gt;&lt;P&gt;Will the left 7 characters always be 'Annn - ' where A is an alpha and n are numeric digits ?&lt;/P&gt;&lt;P&gt;If so, this might make life easier because you can ignore these first 7 character (including the first '-') when you analyse the string.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2017 13:08:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separate-string-into-two-fields-with-delimiter/m-p/1361550#M515383</guid>
      <dc:creator>richard_chilvers</dc:creator>
      <dc:date>2017-05-17T13:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: Separate string into two fields with delimiter</title>
      <link>https://community.qlik.com/t5/QlikView/Separate-string-into-two-fields-with-delimiter/m-p/1361551#M515384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some kind of logic will be needed. If it's always the second '-' then you could use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mid(Field, 1, index(Field, '-', 2) - 1)&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;mid(Field, index(Field, '-', 2) + 1, 100)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2017 13:09:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separate-string-into-two-fields-with-delimiter/m-p/1361551#M515384</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-05-17T13:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: Separate string into two fields with delimiter</title>
      <link>https://community.qlik.com/t5/QlikView/Separate-string-into-two-fields-with-delimiter/m-p/1361552#M515385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Richard, the text before and after the delimiter I need varies in lenght, so I can't ignore measure how many characters to ignore. Thanks though!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2017 13:16:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separate-string-into-two-fields-with-delimiter/m-p/1361552#M515385</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-17T13:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: Separate string into two fields with delimiter</title>
      <link>https://community.qlik.com/t5/QlikView/Separate-string-into-two-fields-with-delimiter/m-p/1361553#M515386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great approach, Marcus! Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2017 13:26:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separate-string-into-two-fields-with-delimiter/m-p/1361553#M515386</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-17T13:26:04Z</dc:date>
    </item>
  </channel>
</rss>

