<?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 Count run of negative values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-run-of-negative-values/m-p/1107845#M366765</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a dataset&amp;nbsp; with positive and negative values.&amp;nbsp; Within the dataset there is a unique identifier that start at '1' and increments by 1 for each row.&amp;nbsp; Is it possible to count the maximum occurrence of a run of negative values eg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="run_count.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/127790_run_count.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;so using the above example I would like to show '5' in a text box the the largest consecutive run of negative values is 5..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Jun 2016 11:06:01 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-06-14T11:06:01Z</dc:date>
    <item>
      <title>Count run of negative values</title>
      <link>https://community.qlik.com/t5/QlikView/Count-run-of-negative-values/m-p/1107845#M366765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a dataset&amp;nbsp; with positive and negative values.&amp;nbsp; Within the dataset there is a unique identifier that start at '1' and increments by 1 for each row.&amp;nbsp; Is it possible to count the maximum occurrence of a run of negative values eg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="run_count.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/127790_run_count.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;so using the above example I would like to show '5' in a text box the the largest consecutive run of negative values is 5..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 11:06:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-run-of-negative-values/m-p/1107845#M366765</guid>
      <dc:creator />
      <dc:date>2016-06-14T11:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: Count run of negative values</title>
      <link>https://community.qlik.com/t5/QlikView/Count-run-of-negative-values/m-p/1107846#M366766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can maybe do it like shown here&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3292"&gt;Counters in the Load&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;add a preceding load:&lt;/P&gt;&lt;P&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Sign(Indicator) =1, DaysWithTrend,0) as DaysWithPositiveTrend,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Sign(Indicator) =-1, DaysWithTrend,0) as DaysWithNegativeTrend&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f5faf0;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000ff;"&gt;Load&lt;/SPAN&gt; *,&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f5faf0;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000ff;"&gt;If&lt;/SPAN&gt;(&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #800000;"&gt;Change &lt;/SPAN&gt;* &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000ff;"&gt;Peek&lt;/SPAN&gt;( &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #800000;"&gt;Change &lt;/SPAN&gt;) &amp;gt; 0,&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f5faf0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000ff;"&gt;Peek&lt;/SPAN&gt;( &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #800000;"&gt;TrendID &lt;/SPAN&gt;),&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f5faf0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000ff;"&gt;RangeSum&lt;/SPAN&gt;( 1, &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000ff;"&gt;Peek&lt;/SPAN&gt;( &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #800000;"&gt;TrendID &lt;/SPAN&gt;))&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f5faf0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #800000;"&gt;TrendID&lt;/SPAN&gt;,&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f5faf0;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000ff;"&gt;If&lt;/SPAN&gt;(&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #800000;"&gt;Change &lt;/SPAN&gt;* &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000ff;"&gt;Peek&lt;/SPAN&gt;( &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #800000;"&gt;Change &lt;/SPAN&gt;) &amp;gt; 0,&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f5faf0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000ff;"&gt;RangeSum&lt;/SPAN&gt;( 1, &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000ff;"&gt;Peek&lt;/SPAN&gt;( &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #800000;"&gt;DaysWithTrend &lt;/SPAN&gt;)),&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f5faf0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f5faf0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #800000;"&gt;DaysWithTrend&lt;/SPAN&gt;;&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f5faf0;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000ff;"&gt;Load&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f5faf0;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #800000;"&gt;Indicator&lt;/SPAN&gt;,&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f5faf0;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #800000;"&gt;Indicator&lt;/SPAN&gt; - &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000ff;"&gt;Peek&lt;/SPAN&gt;( &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #800000;"&gt;Indicator &lt;/SPAN&gt;) &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #800000;"&gt;Change&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f5faf0;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000ff;"&gt;Resident&lt;/SPAN&gt; Daily_TQM_Measurement&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f5faf0;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000ff;"&gt;Order By&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #800000;"&gt;Date&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in your text box:&lt;/P&gt;&lt;P&gt;=Max( DaysWithNegativeTrend)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 11:36:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-run-of-negative-values/m-p/1107846#M366766</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-06-14T11:36:40Z</dc:date>
    </item>
    <item>
      <title>Re: Count run of negative values</title>
      <link>https://community.qlik.com/t5/QlikView/Count-run-of-negative-values/m-p/1107847#M366767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be as attached:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Count_Run_Of_Negative_Numbers.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/127791_Count_Run_Of_Negative_Numbers.jpg" style="height: 350px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 11:42:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-run-of-negative-values/m-p/1107847#M366767</guid>
      <dc:creator>trdandamudi</dc:creator>
      <dc:date>2016-06-14T11:42:48Z</dc:date>
    </item>
  </channel>
</rss>

