<?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: Re: Rolling Ten days in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Rolling-Ten-days/m-p/593859#M220065</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks whiteLine,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used your code but the number&amp;nbsp; NBR for Rolling 10 days is 3 and I get a strange result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Apr 2014 21:22:01 GMT</pubDate>
    <dc:creator>suzel404</dc:creator>
    <dc:date>2014-04-02T21:22:01Z</dc:date>
    <item>
      <title>Rolling Ten days</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-Ten-days/m-p/593857#M220063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I create a flag if I have more than 2 NBR on 10 rolling days, I flag 'KO' or flag 'OK'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I do that into the script ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2014 19:11:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-Ten-days/m-p/593857#M220063</guid>
      <dc:creator>suzel404</dc:creator>
      <dc:date>2014-04-02T19:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Ten days</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-Ten-days/m-p/593858#M220064</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;I calculated the rolling number of NBR, you can easily modify it to get 'OK': &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Accum:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Date,&lt;/P&gt;&lt;P&gt;NBR,&lt;/P&gt;&lt;P&gt;Date+IterNo()-1 as DateAccum&lt;/P&gt;&lt;P&gt;Resident Data&lt;/P&gt;&lt;P&gt;While IterNo()&amp;lt;=10;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left join (Data)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;DateAccum as Date,&lt;/P&gt;&lt;P&gt;Sum(NBR) as NBRAcc&lt;/P&gt;&lt;P&gt;Resident Accum&lt;/P&gt;&lt;P&gt;Group by DateAccum;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table Accum;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2014 19:33:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-Ten-days/m-p/593858#M220064</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2014-04-02T19:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Rolling Ten days</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-Ten-days/m-p/593859#M220065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks whiteLine,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used your code but the number&amp;nbsp; NBR for Rolling 10 days is 3 and I get a strange result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2014 21:22:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-Ten-days/m-p/593859#M220065</guid>
      <dc:creator>suzel404</dc:creator>
      <dc:date>2014-04-02T21:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Rolling Ten days</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-Ten-days/m-p/593860#M220066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I cannot obtain the number of NBR for 10 rollings days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Date, Store, NBR&lt;BR /&gt;01/01/2014, ST1, 0&lt;BR /&gt;02/01/2014, ST1, 0&lt;BR /&gt;03/01/2014, ST2, 1&lt;BR /&gt;04/01/2014 ,ST1, 0&lt;BR /&gt;05/01/2014 ,ST3, 0&lt;BR /&gt;06/01/2014 ,ST3, 0&lt;BR /&gt;07/01/2014 ,ST4, 0&lt;BR /&gt;08/01/2014 ,ST5, 1&lt;BR /&gt;09/01/2014 ,ST1, 0&lt;BR /&gt;10/01/2014 ,ST2, 1&lt;BR /&gt;11/01/2014 ,ST4, 1&lt;BR /&gt;12/01/2014 ,ST5, 1&lt;BR /&gt;13/01/2014 ,ST2, 1&lt;BR /&gt;14/01/2014 ,ST3, 1&lt;BR /&gt;15/01/2014 ,ST4, 1&lt;BR /&gt;16/01/2014 ,ST5, 1&lt;BR /&gt;17/01/2014 ,ST1, 1&lt;BR /&gt;18/01/2014 ,ST5, 1&lt;BR /&gt;19/01/2014 ,ST2, 1&lt;BR /&gt;20/01/2014 ,ST6, 1&lt;BR /&gt;21/01/2014 ,ST3, 1&lt;BR /&gt;22/01/2014 ,ST2, 1&lt;BR /&gt;23/01/2014 ,ST1, 1&lt;BR /&gt;24/01/2014 ,ST7, 1&lt;BR /&gt;25/01/2014 ,ST2, 1&lt;BR /&gt;26/01/2014 ,ST2, 1&lt;BR /&gt;27/01/2014 ,ST3, 1&lt;BR /&gt;28/01/2014 ,ST4, 1&lt;BR /&gt;29/01/2014 ,ST5, 1&lt;BR /&gt;30/01/2014 ,ST2, 1&lt;BR /&gt;31/01/2014 ,ST1, 1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ];&lt;/P&gt;&lt;P&gt;AsOfDate:&lt;BR /&gt;LOAD&lt;BR /&gt; 'Current' as Type,&lt;BR /&gt; Date as Date_AsOf,&lt;BR /&gt; Date as Date,&lt;BR /&gt; Store,&lt;BR /&gt; NBR&lt;BR /&gt;RESIDENT Data;&lt;/P&gt;&lt;P&gt;CONCATENATE (AsOfDate) LOAD&lt;BR /&gt; 'Rolling 10 days' as Type,&lt;BR /&gt; Date as Date_AsOf,&lt;BR /&gt; Date+1-Iterno() as Date,&lt;BR /&gt; Store,&lt;BR /&gt; NBR&lt;BR /&gt;RESIDENT Data&lt;/P&gt;&lt;P&gt;WHILE IterNo() &amp;lt;= 10;&lt;/P&gt;&lt;P&gt;RIGHT JOIN LOAD DISTINCT&lt;BR /&gt; Date&lt;BR /&gt;RESIDENT Data;&lt;/P&gt;&lt;P&gt;DROP TABLE Data;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2014 21:59:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-Ten-days/m-p/593860#M220066</guid>
      <dc:creator>suzel404</dc:creator>
      <dc:date>2014-04-02T21:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Rolling Ten days</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-Ten-days/m-p/593861#M220067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually, you don't.&lt;/P&gt;&lt;P&gt;Since the DateAccum expression was Date&lt;STRONG&gt;+&lt;/STRONG&gt;IterNo()&lt;STRONG&gt;-1 &lt;/STRONG&gt;instead.&lt;/P&gt;&lt;P&gt;This trick saves you at least one join, since now you can build 'as of' calendar and load NBR values simultaneously.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;You can add you flag with easy:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if(Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;NBRAcc&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)=10, 'OK') &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Flag &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 05:40:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-Ten-days/m-p/593861#M220067</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2014-04-03T05:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Ten days</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-Ten-days/m-p/593862#M220068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many Thanks, Whiteline.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 18:16:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-Ten-days/m-p/593862#M220068</guid>
      <dc:creator>suzel404</dc:creator>
      <dc:date>2014-04-03T18:16:44Z</dc:date>
    </item>
  </channel>
</rss>

