<?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: Challenging: Conditionally split string in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Challenging-Conditionally-split-string/m-p/1279425#M623834</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much Sunny. Learned a lot from this...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 22 Jan 2017 22:52:58 GMT</pubDate>
    <dc:creator>holmlund</dc:creator>
    <dc:date>2017-01-22T22:52:58Z</dc:date>
    <item>
      <title>Challenging: Conditionally split string</title>
      <link>https://community.qlik.com/t5/QlikView/Challenging-Conditionally-split-string/m-p/1279419#M623828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to split this string on each $A where interval between following $A-date is more than 60 days?&lt;/P&gt;&lt;P&gt;How would I achieve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RecordId, String&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#000000&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" style="border: 1px solid rgb(0, 0, 0); border-image: none; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;&lt;STRONG&gt;Recor&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;STRONG&gt;dId&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;OriginalString&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1000&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;STRONG style="text-decoration: underline;"&gt;A01.07.2015 00:00:00&lt;/STRONG&gt;|$S07.07.2015 00:00:00|$B07.07.2015 00:00:00|$A10.07.2015$CK16.07.2015 00:00:00|$O16.07.2015 00:00:00&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="text-decoration: underline;"&gt;|&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="text-decoration: underline;"&gt;$A12.10.2015 00:00:00&lt;/STRONG&gt;|$S12.10.2015 00:00:00|$CI16.10.2015 00:00:00&lt;SPAN style="color: #575757;"&gt;|&lt;/SPAN&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;$A19.07.2016&lt;/STRONG&gt;&lt;/SPAN&gt; 00:00:00|$S20.07.2016 00:00:00|$B04.08.2016 00:00:00|$CI23.08.2016 00:00:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&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;Wanted output:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); border-image: none; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;RecordId&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;SplitString&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1000_1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;STRONG&gt;A01.07.2015 00:00:00&lt;/STRONG&gt;|$S07.07.2015 00:00:00|$B07.07.2015 00:00:00|&lt;STRONG&gt;$A10.07.2015&lt;/STRONG&gt;$CK16.07.2015 00:00:00|$O16.07.2015 00:00:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1000_2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;$A12.10.2015 00:00:00&lt;/STRONG&gt;|$S12.10.2015 00:00:00|$CI16.10.2015 00:00:00&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1000_3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;STRONG&gt;$A19.07.2016 00:00:00&lt;/STRONG&gt;|$S20.07.2016 00:00:00|$B04.08.2016 00:00:00|$CI23.08.2016 00:00:00&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can't use subfield as it would split into 4 rows, not taking my condition into consideration.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2017 14:13:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Challenging-Conditionally-split-string/m-p/1279419#M623828</guid>
      <dc:creator>holmlund</dc:creator>
      <dc:date>2017-01-19T14:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: Challenging: Conditionally split string</title>
      <link>https://community.qlik.com/t5/QlikView/Challenging-Conditionally-split-string/m-p/1279420#M623829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD RowNo() as Sort,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Date(Floor(Date#(KeepChar(NewString, '0123456789.: '), 'DD.MM.YYYY hh:mm:ss'))) as Date;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD RecordId,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; OriginalString,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; SubField(OriginalString, '|') as NewString;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * INLINE [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RecordId, OriginalString&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1000, A01.07.2015 00:00:00|$S07.07.2015 00:00:00|$B07.07.2015 00:00:00|$A10.07.2015 00:00:00|$CK16.07.2015 00:00:00|$O16.07.2015 00:00:00|$A12.10.2015 00:00:00|$S12.10.2015 00:00:00|$CI16.10.2015 00:00:00|$A19.07.2016 00:00:00|$S20.07.2016 00:00:00|$B04.08.2016 00:00:00|$CI23.08.2016 00:00:00&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TempTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(Date &amp;lt;= Previous(Date) + 60, Alt(Peek('Flag'), 1), RangeSum(Peek('Flag'), 1)) as Flag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FinalTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD RecordId &amp;amp; '_' &amp;amp; Flag as RecordId,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Concat(DISTINCT NewString, '|') as SplitString&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident TempTable&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Group By RecordId, Flag;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table Table, TempTable;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/150088_Capture.PNG" style="height: 85px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2017 14:34:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Challenging-Conditionally-split-string/m-p/1279420#M623829</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-01-19T14:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: Challenging: Conditionally split string</title>
      <link>https://community.qlik.com/t5/QlikView/Challenging-Conditionally-split-string/m-p/1279421#M623830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately not 100% correct Sunny. This only test for 60 days between one of the process steps. Not only the $A's.&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jan 2017 19:29:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Challenging-Conditionally-split-string/m-p/1279421#M623830</guid>
      <dc:creator>holmlund</dc:creator>
      <dc:date>2017-01-20T19:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: Challenging: Conditionally split string</title>
      <link>https://community.qlik.com/t5/QlikView/Challenging-Conditionally-split-string/m-p/1279422#M623831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So the comparison needs to be only for $A?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jan 2017 19:31:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Challenging-Conditionally-split-string/m-p/1279422#M623831</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-01-20T19:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: Challenging: Conditionally split string</title>
      <link>https://community.qlik.com/t5/QlikView/Challenging-Conditionally-split-string/m-p/1279423#M623832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, comparisons only for the $A's.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jan 2017 23:03:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Challenging-Conditionally-split-string/m-p/1279423#M623832</guid>
      <dc:creator>holmlund</dc:creator>
      <dc:date>2017-01-20T23:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: Challenging: Conditionally split string</title>
      <link>https://community.qlik.com/t5/QlikView/Challenging-Conditionally-split-string/m-p/1279424#M623833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD RowNo() as Sort,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;STRONG&gt;RecordId,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; OriginalString,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; '$A' &amp;amp; NewString as NewString,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Date(Floor(Date#(SubField(NewString, '|', 1), 'DD.MM.YYYY hh:mm:ss'))) as Date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Where Len(Trim(NewString)) &amp;gt; 0;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD RecordId,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; OriginalString,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; SubField('|' &amp;amp; OriginalString, '|$A') as NewString;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * INLINE [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RecordId, OriginalString&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1000, $A01.07.2015 00:00:00|$S07.07.2015 00:00:00|$B07.07.2015 00:00:00|$A10.07.2015 00:00:00|$CK16.07.2015 00:00:00|$O16.07.2015 00:00:00|$A12.10.2015 00:00:00|$S12.10.2015 00:00:00|$CI16.10.2015 00:00:00|$A19.07.2016 00:00:00|$S20.07.2016 00:00:00|$B04.08.2016 00:00:00|$CI23.08.2016 00:00:00&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TempTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(Date &amp;lt;= Previous(Date) + 60, Alt(Peek('Flag'), 1), RangeSum(Peek('Flag'), 1)) as Flag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FinalTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD RecordId &amp;amp; '_' &amp;amp; Flag as RecordId,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Concat(DISTINCT NewString, '|') as SplitString&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident TempTable&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Group By RecordId, Flag;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table Table, TempTable;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jan 2017 15:16:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Challenging-Conditionally-split-string/m-p/1279424#M623833</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-01-21T15:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: Challenging: Conditionally split string</title>
      <link>https://community.qlik.com/t5/QlikView/Challenging-Conditionally-split-string/m-p/1279425#M623834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much Sunny. Learned a lot from this...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Jan 2017 22:52:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Challenging-Conditionally-split-string/m-p/1279425#M623834</guid>
      <dc:creator>holmlund</dc:creator>
      <dc:date>2017-01-22T22:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: Challenging: Conditionally split string</title>
      <link>https://community.qlik.com/t5/QlikView/Challenging-Conditionally-split-string/m-p/1279426#M623835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No problem at all... I am glad I was able to help you learn &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2017 01:36:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Challenging-Conditionally-split-string/m-p/1279426#M623835</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-01-23T01:36:14Z</dc:date>
    </item>
  </channel>
</rss>

