<?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: 10 Weeks and 39 Weeks rolling Moving Avg in Load Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/10-Weeks-and-39-Weeks-rolling-Moving-Avg-in-Load-Script/m-p/968756#M331899</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One point i forget to add that is i want to consider the missing Week also in the count.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example if scripcode is not sales in a particular week then also that week will consider in count.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Dec 2015 07:29:35 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-12-08T07:29:35Z</dc:date>
    <item>
      <title>10 Weeks and 39 Weeks rolling Moving Avg in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/10-Weeks-and-39-Weeks-rolling-Moving-Avg-in-Load-Script/m-p/968755#M331898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Expert, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have scripcode wise Week wise sales information. i want load those data to Qlikview Application and also want 10 Weeks rolling moving avg and 39 Weeks rolling moving avg along with that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am sharing you a sample excel for ready reference. In Excel i have already added 10week rolling moving Avg and 39 Week rolling moving avg for your reference purpose. which i want to calculate while loading the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the sample file contain only one scripcode in original there are many scripcode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;JKV&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 07:19:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/10-Weeks-and-39-Weeks-rolling-Moving-Avg-in-Load-Script/m-p/968755#M331898</guid>
      <dc:creator />
      <dc:date>2015-12-08T07:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: 10 Weeks and 39 Weeks rolling Moving Avg in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/10-Weeks-and-39-Weeks-rolling-Moving-Avg-in-Load-Script/m-p/968756#M331899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One point i forget to add that is i want to consider the missing Week also in the count.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example if scripcode is not sales in a particular week then also that week will consider in count.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 07:29:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/10-Weeks-and-39-Weeks-rolling-Moving-Avg-in-Load-Script/m-p/968756#M331899</guid>
      <dc:creator />
      <dc:date>2015-12-08T07:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: 10 Weeks and 39 Weeks rolling Moving Avg in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/10-Weeks-and-39-Weeks-rolling-Moving-Avg-in-Load-Script/m-p/968757#M331900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If you want this in Chart Level, You can try like..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RangeAvg (above(sum(sales),0,10))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RangeAvg (above(sum(sales),0,39))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Check the Attachment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can refer the below Link also:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-4252"&gt;Calculating rolling n-period totals, averages or other aggregations&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 07:57:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/10-Weeks-and-39-Weeks-rolling-Moving-Avg-in-Load-Script/m-p/968757#M331900</guid>
      <dc:creator>settu_periasamy</dc:creator>
      <dc:date>2015-12-08T07:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: 10 Weeks and 39 Weeks rolling Moving Avg in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/10-Weeks-and-39-Weeks-rolling-Moving-Avg-in-Load-Script/m-p/968758#M331901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Settu, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for you reply. i dont want to do that at chart level. because i have to do lots of historical analysis at load level only on the basis of the data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 08:34:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/10-Weeks-and-39-Weeks-rolling-Moving-Avg-in-Load-Script/m-p/968758#M331901</guid>
      <dc:creator />
      <dc:date>2015-12-08T08:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: 10 Weeks and 39 Weeks rolling Moving Avg in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/10-Weeks-and-39-Weeks-rolling-Moving-Avg-in-Load-Script/m-p/968759#M331902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have found a better way to do rolling Avg on load script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) First i have done Scrip code wise cummlative sum of all Weeks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) After that when my Rolling Week count reach i subtract cumulative sum from the 5 record backs cumlative sum and divide by 5 so i get rolling avg of 5 Week.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tbl_Cumm:&lt;/P&gt;&lt;P&gt;load *,&lt;/P&gt;&lt;P&gt;if([Scrip Code]=Peek([Scrip Code]) and TradingWeekSeqNo&amp;gt;5,([Cumm Close Rate]-Peek([Cumm Close Rate],-5))/5,[Cumm Close Rate]/TradingWeekSeqNo ) as Rolling ;&lt;/P&gt;&lt;P&gt;load&amp;nbsp; [Scrip Code],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TradingWeekSeqNo,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Close Rate],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( [Scrip Code]=Peek([Scrip Code]),RangeSum([Close Rate],peek([Cumm Close Rate])),[Close Rate]) as [Cumm Close Rate]&lt;/P&gt;&lt;P&gt;Resident tbl_Weeklytrade where [Scrip Code]&amp;gt;=500000 and [Scrip Code]&amp;lt;=599999 order by [Scrip Code],TradingWeekSeqNo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 11:17:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/10-Weeks-and-39-Weeks-rolling-Moving-Avg-in-Load-Script/m-p/968759#M331902</guid>
      <dc:creator />
      <dc:date>2015-12-08T11:17:01Z</dc:date>
    </item>
  </channel>
</rss>

