<?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 Script Average all values that have bigger dates in Search the Community</title>
    <link>https://community.qlik.com/t5/Search-the-Community/Script-Average-all-values-that-have-bigger-dates/m-p/1825911#M449</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a set of data that includes dates and amounts. For each date on the script i need to calculate a fielad that has an average of all amount that have dates bigger or equal to the date of the row. Every day a value will be added so the last date will be moving and all the averages will be recalculated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I leave an example in the uploaded excel.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 31 Jul 2021 23:06:00 GMT</pubDate>
    <dc:creator>cdy1</dc:creator>
    <dc:date>2021-07-31T23:06:00Z</dc:date>
    <item>
      <title>Script Average all values that have bigger dates</title>
      <link>https://community.qlik.com/t5/Search-the-Community/Script-Average-all-values-that-have-bigger-dates/m-p/1825911#M449</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a set of data that includes dates and amounts. For each date on the script i need to calculate a fielad that has an average of all amount that have dates bigger or equal to the date of the row. Every day a value will be added so the last date will be moving and all the averages will be recalculated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I leave an example in the uploaded excel.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 31 Jul 2021 23:06:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Search-the-Community/Script-Average-all-values-that-have-bigger-dates/m-p/1825911#M449</guid>
      <dc:creator>cdy1</dc:creator>
      <dc:date>2021-07-31T23:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: Script Average all values that have bigger dates</title>
      <link>https://community.qlik.com/t5/Search-the-Community/Script-Average-all-values-that-have-bigger-dates/m-p/1825930#M450</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/142958"&gt;@cdy1&lt;/a&gt;&amp;nbsp; if you have unique records per each day then try below. If you don't have unique records per date then you first need to create aggregated table which holds unique records per each date, then you can try below method&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Data:
LOAD date, 
     amount
FROM
[qlik avg below.xlsx]
(ooxml, embedded labels, table is Sheet1);

Final:
LOAD *,
     Accum/RowNo() as Avg_Amt;
LOAD *,
     rangesum(amount,peek('Accum')) as Accum
Resident Data
Order by date desc;

DROP Table Data;

DROP field Accum;&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 01 Aug 2021 13:39:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Search-the-Community/Script-Average-all-values-that-have-bigger-dates/m-p/1825930#M450</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2021-08-01T13:39:11Z</dc:date>
    </item>
  </channel>
</rss>

