<?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: Indicate sequence between specified rows in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Indicate-sequence-between-specified-rows/m-p/1695942#M596696</link>
    <description>&lt;P&gt;One solution is:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;tab1:
LOAD *, If(Descr='StartEvent',K1,If(Previous(Descr)='StopEvent' Or IsNull(Peek('K1')) Or Peek('K2')=0,0,K1)) As K2;
LOAD *
	 ,If(Descr='StartEvent',RangeSum(Peek('K1'),1), Peek('K1')) As K1
	 ;
LOAD RecNo() As RowID, * INLINE [
    Descr, comment, value
    whatever1, aComment, 12
    whatever2, anotherComment, 88
    StartEvent,,
    something1,comment,334
    something2,comment,444
    StopEvent,,
    whatever3,acomment,83
    whatever1,acomment,0
    whatever4,acoment,89
    StartEvent,,
    Something2,comment,9939
    .
    .
    StopEvent
    Something3
];
Drop Field K1;&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="commQV13.PNG" style="width: 263px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/32324iD898738A7B8BD824/image-size/large?v=v2&amp;amp;px=999" role="button" title="commQV13.PNG" alt="commQV13.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Apr 2020 23:36:35 GMT</pubDate>
    <dc:creator>Saravanan_Desingh</dc:creator>
    <dc:date>2020-04-22T23:36:35Z</dc:date>
    <item>
      <title>Indicate sequence between specified rows</title>
      <link>https://community.qlik.com/t5/QlikView/Indicate-sequence-between-specified-rows/m-p/1571424#M596695</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm evaluating a log file. In the file there are logs continuously. Some of the lines are related. There is a line that says that an event started, then there are logs about the event, and then the event ends. Then there are unrelated lines until (the same event) starts again with loglines until the end-event.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically there are several colums in a CSV file, one of them is the description of the event which can be lots of thing, one is StartEvent another is StopEvent.&amp;nbsp;&lt;/P&gt;&lt;P&gt;By goal is to have only the events between the start and stop row, and have indicator added to each row that it is related to the first of the eventsequence, the second, third etc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;my data looks like this&lt;/P&gt;&lt;P&gt;Descr, comment, value&lt;BR /&gt;whatever1, aComment, 12&lt;BR /&gt;whatever2, anotherComment,88&lt;BR /&gt;StartEvent,,&lt;BR /&gt;something1,comment,334&lt;BR /&gt;something2,comment,444&lt;BR /&gt;Stopevent,,&lt;BR /&gt;whatever3,acomment,83&lt;BR /&gt;whatever1,acomment,0&lt;BR /&gt;whatever4,acoment,89&lt;BR /&gt;Startevent,,&lt;BR /&gt;Something2,comment,9939&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;Stopevent&lt;/P&gt;&lt;P&gt;ect.&lt;/P&gt;&lt;P&gt;I like to get&lt;/P&gt;&lt;P&gt;Descr, comment, value,eventseq&lt;BR /&gt;whatever1, aComment, 12,0&lt;BR /&gt;whatever2, anotherComment,88,0&lt;BR /&gt;StartEvent,,,1&lt;BR /&gt;something1,comment,334,1&lt;BR /&gt;something2,comment,444,1&lt;BR /&gt;Stopevent,,,1&lt;BR /&gt;whatever3,acomment,83,0&lt;BR /&gt;whatever1,acomment,0,0&lt;BR /&gt;whatever4,acoment,89,0&lt;BR /&gt;Startevent,,,2&lt;BR /&gt;Something2,comment,9939,2&lt;BR /&gt;.,2&lt;BR /&gt;.,2&lt;BR /&gt;Stopevent,,,2&lt;/P&gt;&lt;P&gt;Any hints ?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Carl&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2019 15:30:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Indicate-sequence-between-specified-rows/m-p/1571424#M596695</guid>
      <dc:creator>carlwillems</dc:creator>
      <dc:date>2019-04-19T15:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: Indicate sequence between specified rows</title>
      <link>https://community.qlik.com/t5/QlikView/Indicate-sequence-between-specified-rows/m-p/1695942#M596696</link>
      <description>&lt;P&gt;One solution is:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;tab1:
LOAD *, If(Descr='StartEvent',K1,If(Previous(Descr)='StopEvent' Or IsNull(Peek('K1')) Or Peek('K2')=0,0,K1)) As K2;
LOAD *
	 ,If(Descr='StartEvent',RangeSum(Peek('K1'),1), Peek('K1')) As K1
	 ;
LOAD RecNo() As RowID, * INLINE [
    Descr, comment, value
    whatever1, aComment, 12
    whatever2, anotherComment, 88
    StartEvent,,
    something1,comment,334
    something2,comment,444
    StopEvent,,
    whatever3,acomment,83
    whatever1,acomment,0
    whatever4,acoment,89
    StartEvent,,
    Something2,comment,9939
    .
    .
    StopEvent
    Something3
];
Drop Field K1;&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="commQV13.PNG" style="width: 263px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/32324iD898738A7B8BD824/image-size/large?v=v2&amp;amp;px=999" role="button" title="commQV13.PNG" alt="commQV13.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 23:36:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Indicate-sequence-between-specified-rows/m-p/1695942#M596696</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2020-04-22T23:36:35Z</dc:date>
    </item>
  </channel>
</rss>

