<?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: Calculating rolling 7 days averages in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966580#M647527</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joseph,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand you already have some chart displaying the sum of whatever per day?&lt;/P&gt;&lt;P&gt;There are functions in QlikView - BEFORE and AFTER I think, haven't yet found a use for them, but they ARE useful - which allow you to access the different "points" along your dimension which is the day.&lt;/P&gt;&lt;P&gt;I think that would be a good starting_point for a rolling average in a chart.&lt;/P&gt;&lt;P&gt;Sorry I cannot help you further, as I said I haven't yet done it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Oct 2015 09:19:22 GMT</pubDate>
    <dc:creator>datanibbler</dc:creator>
    <dc:date>2015-10-13T09:19:22Z</dc:date>
    <item>
      <title>Calculating rolling 7 days averages in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966578#M647525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi team,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to do something tricky and could use some help. I have a number of dates for which I also have a number of transactions. Assume that, as a first step, we do a sum of these transactions per day using a group by but still the group by wont only be on date so we might have a various number of rows per each date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want to do is calculate for each row the average of these sums for that date and the 6 previous ones and save it as a new field. It is worth noting that I dont have all calendar dates available and as I said could be more than one rows per date even after group by so i am not sure how helpful functions like previous () etc can be unless the date can be checked specifically..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas? This has to be done in the script..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 08:41:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966578#M647525</guid>
      <dc:creator />
      <dc:date>2015-10-13T08:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating rolling 7 days averages in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966579#M647526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joseph,&lt;/P&gt;&lt;P&gt;If you have a SQL database in source, like Oracle or SQLServer you can use a partition by windowing function.&lt;/P&gt;&lt;P&gt;Else, if you can't, maybe you can create a second transaction date in your table which is 7 days after the real one. Then, with a interval match joining the table with itself you will be able to group all the transactions.&lt;/P&gt;&lt;P&gt;I hope it's clear :-).&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vincent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 09:13:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966579#M647526</guid>
      <dc:creator>vincent_ardiet</dc:creator>
      <dc:date>2015-10-13T09:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating rolling 7 days averages in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966580#M647527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joseph,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand you already have some chart displaying the sum of whatever per day?&lt;/P&gt;&lt;P&gt;There are functions in QlikView - BEFORE and AFTER I think, haven't yet found a use for them, but they ARE useful - which allow you to access the different "points" along your dimension which is the day.&lt;/P&gt;&lt;P&gt;I think that would be a good starting_point for a rolling average in a chart.&lt;/P&gt;&lt;P&gt;Sorry I cannot help you further, as I said I haven't yet done it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 09:19:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966580#M647527</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2015-10-13T09:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating rolling 7 days averages in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966581#M647528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use previous function in Qlikview or i will sugest is to have all dates sorted and use rowno() and assign them a rank then just take only Rank&amp;lt;=6 as average &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 09:27:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966581#M647528</guid>
      <dc:creator>sujeetsingh</dc:creator>
      <dc:date>2015-10-13T09:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating rolling 7 days averages in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966582#M647529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vincent,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That sounds promising.. Could you provide a short example if not too much to ask&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 09:36:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966582#M647529</guid>
      <dc:creator />
      <dc:date>2015-10-13T09:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating rolling 7 days averages in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966583#M647530</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;Sorry just changed the description above, I can still have a various number of rows per date even after the group by, lets say by employee id&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 09:38:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966583#M647530</guid>
      <dc:creator />
      <dc:date>2015-10-13T09:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating rolling 7 days averages in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966584#M647531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you provide sample app or data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks ,&lt;/P&gt;&lt;P&gt;Bunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 10:05:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966584#M647531</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-13T10:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating rolling 7 days averages in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966585#M647532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rolling can be done by ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Range sum &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or Above function which helps in rolling previous days results&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or by having aggr with range sum function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;bunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 10:06:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966585#M647532</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-13T10:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating rolling 7 days averages in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966586#M647533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't test what I'm writing so you may have some adjustments to do, so for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tmp1_dailytransactions:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;&amp;nbsp; transac_date&lt;/P&gt;&lt;P&gt;, employee_id&lt;/P&gt;&lt;P&gt;, sum(amount) as total_amount&lt;/P&gt;&lt;P&gt;resident transaction_table&lt;/P&gt;&lt;P&gt;group by&lt;/P&gt;&lt;P&gt;&amp;nbsp; transac_date&lt;/P&gt;&lt;P&gt;, employee_id ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tmp2_avgtransactions:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;&amp;nbsp; transac_date&lt;/P&gt;&lt;P&gt;, date(transac_date+6) as transac_window_date&lt;/P&gt;&lt;P&gt;, amount&lt;/P&gt;&lt;P&gt;resident transaction_table ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inner join (tmp1_dailytransactions)&lt;/P&gt;&lt;P&gt;interval match (transac_date)&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;&amp;nbsp; transac_date&lt;/P&gt;&lt;P&gt;, transac_window_date&lt;/P&gt;&lt;P&gt;, amount&lt;/P&gt;&lt;P&gt;resident tmp2_avgtransactions ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dailytransactions:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;&amp;nbsp; transac_date&lt;/P&gt;&lt;P&gt;, employee_id&amp;nbsp; &lt;/P&gt;&lt;P&gt;, total_amount&lt;/P&gt;&lt;P&gt;, avg(amount) as avg_amount&lt;/P&gt;&lt;P&gt;resident tmp1_dailytransactions&lt;/P&gt;&lt;P&gt;group by&lt;/P&gt;&lt;P&gt;&amp;nbsp; transac_date&lt;/P&gt;&lt;P&gt;, employee_id&amp;nbsp; &lt;/P&gt;&lt;P&gt;, total_amount ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop tables tmp1_dailytransactions, tmp2_avgtransactions ;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 10:16:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966586#M647533</guid>
      <dc:creator>vincent_ardiet</dc:creator>
      <dc:date>2015-10-13T10:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating rolling 7 days averages in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966587#M647534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 396px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" width="87"&gt;DATE&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="89"&gt;Employee&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="105"&gt;Amount 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;10/1/2015&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Adam&lt;/TD&gt;&lt;TD align="right"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;10/1/2015&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;George&lt;/TD&gt;&lt;TD align="right"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;10/1/2015&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;George&lt;/TD&gt;&lt;TD align="right"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;10/1/2015&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;George&lt;/TD&gt;&lt;TD align="right"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;10/1/2015&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;George&lt;/TD&gt;&lt;TD align="right"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17"&gt;09/30/2015&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Adam&lt;/TD&gt;&lt;TD align="right"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17"&gt;09/30/2015&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Adam&lt;/TD&gt;&lt;TD align="right"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17"&gt;09/30/2015&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Adam&lt;/TD&gt;&lt;TD align="right"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17"&gt;09/30/2015&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;George&lt;/TD&gt;&lt;TD align="right"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17"&gt;09/28/2015&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;George&lt;/TD&gt;&lt;TD align="right"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17"&gt;09/28/2015&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;George&lt;/TD&gt;&lt;TD align="right"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17"&gt;09/28/2015&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;George&lt;/TD&gt;&lt;TD align="right"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17"&gt;09/23/2015&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;"&gt;Adam&lt;/TD&gt;&lt;TD align="right"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17"&gt;09/23/2015&lt;/TD&gt;&lt;TD class="xl64" style="border-left: none;"&gt;George&lt;/TD&gt;&lt;TD align="right"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17"&gt;09/23/2015&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;George&lt;/TD&gt;&lt;TD align="right"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17"&gt;09/23/2015&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;George&lt;/TD&gt;&lt;TD align="right"&gt;10&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;Now imagine the first row like this instead&lt;BR /&gt;10/1/2015&amp;nbsp;&amp;nbsp; Adam&amp;nbsp;&amp;nbsp; (average of Amount 1 for Adam for dates 10/1, 9/30, 9/29, 9/28, 9/27, 9/26) = 25/4 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thats even though not all dates exist&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 10:18:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966587#M647534</guid>
      <dc:creator />
      <dc:date>2015-10-13T10:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating rolling 7 days averages in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966588#M647535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just provided sample data\&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" style="border: 0px solid black;" width="87"&gt;DATE&lt;/TD&gt;&lt;TD class="xl63" style="border: 0px solid black; border-left: none;" width="89"&gt;Employee&lt;/TD&gt;&lt;TD class="xl63" style="border: 0px solid black; border-left: none;" width="105"&gt;Amount 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border: 0px solid black; border-top: none;"&gt;10/1/2015&lt;/TD&gt;&lt;TD class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;Adam&lt;/TD&gt;&lt;TD align="right" style="border: 0px solid black;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border: 0px solid black; border-top: none;"&gt;10/1/2015&lt;/TD&gt;&lt;TD class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;George&lt;/TD&gt;&lt;TD align="right" style="border: 0px solid black;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border: 0px solid black; border-top: none;"&gt;10/1/2015&lt;/TD&gt;&lt;TD class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;George&lt;/TD&gt;&lt;TD align="right" style="border: 0px solid black;"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border: 0px solid black; border-top: none;"&gt;10/1/2015&lt;/TD&gt;&lt;TD class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;George&lt;/TD&gt;&lt;TD align="right" style="border: 0px solid black;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border: 0px solid black; border-top: none;"&gt;10/1/2015&lt;/TD&gt;&lt;TD class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;George&lt;/TD&gt;&lt;TD align="right" style="border: 0px solid black;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border: 0px solid black;"&gt;09/30/2015&lt;/TD&gt;&lt;TD class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;Adam&lt;/TD&gt;&lt;TD align="right" style="border: 0px solid black;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border: 0px solid black;"&gt;09/30/2015&lt;/TD&gt;&lt;TD class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;Adam&lt;/TD&gt;&lt;TD align="right" style="border: 0px solid black;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border: 0px solid black;"&gt;09/30/2015&lt;/TD&gt;&lt;TD class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;Adam&lt;/TD&gt;&lt;TD align="right" style="border: 0px solid black;"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border: 0px solid black;"&gt;09/30/2015&lt;/TD&gt;&lt;TD class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;George&lt;/TD&gt;&lt;TD align="right" style="border: 0px solid black;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border: 0px solid black;"&gt;09/28/2015&lt;/TD&gt;&lt;TD class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;George&lt;/TD&gt;&lt;TD align="right" style="border: 0px solid black;"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border: 0px solid black;"&gt;09/28/2015&lt;/TD&gt;&lt;TD class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;George&lt;/TD&gt;&lt;TD align="right" style="border: 0px solid black;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border: 0px solid black;"&gt;09/28/2015&lt;/TD&gt;&lt;TD class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;George&lt;/TD&gt;&lt;TD align="right" style="border: 0px solid black;"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border: 0px solid black;"&gt;09/23/2015&lt;/TD&gt;&lt;TD class="xl65" style="border: 0px solid black; border-left: none;"&gt;Adam&lt;/TD&gt;&lt;TD align="right" style="border: 0px solid black;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border: 0px solid black;"&gt;09/23/2015&lt;/TD&gt;&lt;TD class="xl64" style="border: 0px solid black; border-left: none;"&gt;George&lt;/TD&gt;&lt;TD align="right" style="border: 0px solid black;"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border: 0px solid black;"&gt;09/23/2015&lt;/TD&gt;&lt;TD class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;George&lt;/TD&gt;&lt;TD align="right" style="border: 0px solid black;"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border: 0px solid black;"&gt;09/23/2015&lt;/TD&gt;&lt;TD class="xl64" style="border: 0px solid black; border-left: none; border-top: none;"&gt;George&lt;/TD&gt;&lt;TD align="right" style="border: 0px solid black;"&gt;10&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;Now imagine the first row like this instead&lt;BR /&gt;10/1/2015&amp;nbsp;&amp;nbsp; Adam&amp;nbsp;&amp;nbsp; (average of Amount 1 for Adam for dates 10/1, 9/30, 9/29, 9/28, 9/27, 9/26) = 25/4 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thats even though not all dates exist&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 10:20:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966588#M647535</guid>
      <dc:creator />
      <dc:date>2015-10-13T10:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating rolling 7 days averages in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966589#M647536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah the average is also by employee, so:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tmp1_dailytransactions:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;&amp;nbsp; transac_date&lt;/P&gt;&lt;P&gt;, employee_id&lt;/P&gt;&lt;P&gt;, sum(amount) as total_amount&lt;/P&gt;&lt;P&gt;resident transaction_table&lt;/P&gt;&lt;P&gt;group by&lt;/P&gt;&lt;P&gt;&amp;nbsp; transac_date&lt;/P&gt;&lt;P&gt;, employee_id ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tmp2_avgtransactions:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;&amp;nbsp; transac_date&lt;/P&gt;&lt;P&gt;, employee_id&lt;/P&gt;&lt;P&gt;, date(transac_date+6) as transac_window_date&lt;/P&gt;&lt;P&gt;, amount&lt;/P&gt;&lt;P&gt;resident transaction_table ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inner join (tmp1_dailytransactions)&lt;/P&gt;&lt;P&gt;interval match (transac_date, employee_id)&lt;/P&gt;&lt;P&gt;load distinct&lt;/P&gt;&lt;P&gt;&amp;nbsp; transac_date&lt;/P&gt;&lt;P&gt;, transac_window_date&lt;/P&gt;&lt;P&gt;, employee_id&lt;/P&gt;&lt;P&gt;resident tmp2_avgtransactions ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Sorry there was a mistake here in the previous code, amount can't be in the interval match join&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inner join (tmp1_dailytransactions)&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;&amp;nbsp; transac_date&lt;/P&gt;&lt;P&gt;, transac_window_date&lt;/P&gt;&lt;P&gt;, employee_id&lt;/P&gt;&lt;P&gt;, amount&lt;/P&gt;&lt;P&gt;resident tmp2_avgtransactions ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dailytransactions:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;&amp;nbsp; transac_date&lt;/P&gt;&lt;P&gt;, employee_id&amp;nbsp; &lt;/P&gt;&lt;P&gt;, total_amount&lt;/P&gt;&lt;P&gt;, avg(amount) as avg_amount&lt;/P&gt;&lt;P&gt;resident tmp1_dailytransactions&lt;/P&gt;&lt;P&gt;group by&lt;/P&gt;&lt;P&gt;&amp;nbsp; transac_date&lt;/P&gt;&lt;P&gt;, employee_id&amp;nbsp; &lt;/P&gt;&lt;P&gt;, total_amount ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop tables tmp1_dailytransactions, tmp2_avgtransactions ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 10:25:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966589#M647536</guid>
      <dc:creator>vincent_ardiet</dc:creator>
      <dc:date>2015-10-13T10:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating rolling 7 days averages in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966590#M647537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Although I can follow the idea it doesn't seem to work. In my model I start with one table only (so transaction_table is no longer needed) which you can get by copy pasting this. So you can assume we start from your tmp1_dailytransactions that is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD date(BUSDATE) as BUSDATE, Employee, sum(Amount) as TAmount&lt;/P&gt;&lt;P&gt;group by date(BUSDATE), Employee;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;BUSDATE,&amp;nbsp;&amp;nbsp;&amp;nbsp; Employee,&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount&lt;/P&gt;&lt;P&gt;1/10/2015,&amp;nbsp;&amp;nbsp;&amp;nbsp; Adam,&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&lt;/P&gt;&lt;P&gt;1/10/2015,&amp;nbsp;&amp;nbsp;&amp;nbsp; George,&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&lt;/P&gt;&lt;P&gt;1/10/2015,&amp;nbsp;&amp;nbsp;&amp;nbsp; George,&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;/P&gt;&lt;P&gt;1/10/2015,&amp;nbsp;&amp;nbsp;&amp;nbsp; George,&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&lt;/P&gt;&lt;P&gt;1/10/2015,&amp;nbsp;&amp;nbsp;&amp;nbsp; George,&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&lt;/P&gt;&lt;P&gt;30/09/2015,&amp;nbsp;&amp;nbsp;&amp;nbsp; Adam,&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&lt;/P&gt;&lt;P&gt;30/09/2015,&amp;nbsp;&amp;nbsp;&amp;nbsp; Adam,&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&lt;/P&gt;&lt;P&gt;30/09/2015,&amp;nbsp;&amp;nbsp;&amp;nbsp; Adam,&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;/P&gt;&lt;P&gt;30/09/2015,&amp;nbsp;&amp;nbsp;&amp;nbsp; George,&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&lt;/P&gt;&lt;P&gt;28/09/2015,&amp;nbsp;&amp;nbsp;&amp;nbsp; George,&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;/P&gt;&lt;P&gt;28/09/2015,&amp;nbsp;&amp;nbsp;&amp;nbsp; George,&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&lt;/P&gt;&lt;P&gt;28/09/2015,&amp;nbsp;&amp;nbsp;&amp;nbsp; George,&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;/P&gt;&lt;P&gt;23/09/2015,&amp;nbsp;&amp;nbsp;&amp;nbsp; Adam,&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&lt;/P&gt;&lt;P&gt;23/09/2015,&amp;nbsp;&amp;nbsp;&amp;nbsp; George,&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;/P&gt;&lt;P&gt;23/09/2015,&amp;nbsp;&amp;nbsp;&amp;nbsp; George,&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;/P&gt;&lt;P&gt;23/09/2015,&amp;nbsp;&amp;nbsp;&amp;nbsp; George,&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I am trying to create the inner join and the interval match unsuccessfully..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 14:12:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966590#M647537</guid>
      <dc:creator />
      <dc:date>2015-10-13T14:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating rolling 7 days averages in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966591#M647538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Worth mentioning that we need to go 6 days BACK so date(transac_date - 6) as transac_window_date&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 14:30:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966591#M647538</guid>
      <dc:creator />
      <dc:date>2015-10-13T14:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating rolling 7 days averages in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966592#M647539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joseph,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use two variables and assign the selected date in one variable and assign the (selected date -6) in 2nd variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in the expression using set analysis you can calculate the average.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;SK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 14:30:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966592#M647539</guid>
      <dc:creator>santhosh_k_n</dc:creator>
      <dc:date>2015-10-13T14:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating rolling 7 days averages in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966593#M647540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No transaction_table is useful because it is used twice. Create it with your inline table.&lt;/P&gt;&lt;P&gt;Then, if you want to go 6 days back, it's +6 and not -6. For example with the lines "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;23/09/2015,&amp;nbsp;&amp;nbsp;&amp;nbsp; George,&amp;nbsp;&amp;nbsp;&amp;nbsp; 10", with the +6, transac_windows_date will be the 29th. So then, when you will join with the total amount of the 29th, the line from the 23rd will be picked up. I know it's not natural but when you want to associated past data with future data it's easier to move forward the date of the past.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 14:50:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966593#M647540</guid>
      <dc:creator>vincent_ardiet</dc:creator>
      <dc:date>2015-10-13T14:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating rolling 7 days averages in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966594#M647541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok so it runs now but not giving the desired results, by mirroring the above I get&lt;/P&gt;&lt;P&gt;transac_date, employee_id&amp;nbsp; , total_amount, avg_amount&lt;/P&gt;&lt;P&gt;1/10/2015 Adam&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6.66667&lt;/P&gt;&lt;P&gt;30/09/2015 George&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6.66667&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so dates &amp;amp; employees combos missing and the total and average amount is not right either. What i am after is one row per date&amp;amp;employee giving the total amount (thats the tmp1_dailytransactions table basically) and then the avg amount which for 1/10/2015 and Adam is all Adam's amount for all days till 25/09, so that's it&lt;BR /&gt;(5 + 5 + 5 + 10) / 4 = 6.25&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 15:10:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966594#M647541</guid>
      <dc:creator />
      <dc:date>2015-10-13T15:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating rolling 7 days averages in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966595#M647542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Santhosh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This needs to be done in the script unfortunately&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 15:46:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966595#M647542</guid>
      <dc:creator />
      <dc:date>2015-10-13T15:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating rolling 7 days averages in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966596#M647543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry I have no QlikView to test (no version for Android yet &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;).&lt;/P&gt;&lt;P&gt;I think that the Inner Join are a mistake,&amp;nbsp; replace all of them by left join.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 15:51:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966596#M647543</guid>
      <dc:creator>vincent_ardiet</dc:creator>
      <dc:date>2015-10-13T15:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating rolling 7 days averages in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966597#M647544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you following this code by eye? &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; Yes I had changed that myself which fixed the missing rows thing but averages still wrong:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE bgcolor="#ffffff" border="1" cellpadding="2" cellspacing="0" style="font-size: 9pt;"&gt;&lt;TBODY&gt;&lt;TR bgcolor="#f5f5f5"&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;BUSDATE&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Employee&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;TAmount&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;avg_amount&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1/10/2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Adam&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;5&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;6.6666667&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1/10/2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;George&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;25&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;30/09/2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Adam&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;20&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;30/09/2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;George&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;5&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;6.6666667&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;28/09/2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;George&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;25&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;23/09/2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Adam&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;5&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;23/09/2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;George&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;30&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&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;I have attached the whole script for you to check when you get the chance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 15:56:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-rolling-7-days-averages-in-script/m-p/966597#M647544</guid>
      <dc:creator />
      <dc:date>2015-10-13T15:56:09Z</dc:date>
    </item>
  </channel>
</rss>

