<?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 Simple Moving Average within a Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Simple-Moving-Average-within-a-Script/m-p/165207#M37612</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to calculate a Simple Moving Average within my loading script. A SQL based example would be something like:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;select a.quote_date, a.close_price, AVG(b.close_price) [20_day_sma] from&lt;BR /&gt; my_stock a&lt;BR /&gt; join my_stock b&lt;BR /&gt; on a.quote_date &amp;gt;= b.quote_date&lt;BR /&gt; and b.quote_date &amp;gt;= DATEADD(dd,-20,a.quote_date)&lt;BR /&gt; group by a.quote_date, a.close_price&lt;BR /&gt; order by 1&lt;/P&gt;&lt;P&gt;Is there a way to do this self join technique in QlikView?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 May 2010 12:43:52 GMT</pubDate>
    <dc:creator>r3iuk</dc:creator>
    <dc:date>2010-05-26T12:43:52Z</dc:date>
    <item>
      <title>Simple Moving Average within a Script</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-Moving-Average-within-a-Script/m-p/165207#M37612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to calculate a Simple Moving Average within my loading script. A SQL based example would be something like:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;select a.quote_date, a.close_price, AVG(b.close_price) [20_day_sma] from&lt;BR /&gt; my_stock a&lt;BR /&gt; join my_stock b&lt;BR /&gt; on a.quote_date &amp;gt;= b.quote_date&lt;BR /&gt; and b.quote_date &amp;gt;= DATEADD(dd,-20,a.quote_date)&lt;BR /&gt; group by a.quote_date, a.close_price&lt;BR /&gt; order by 1&lt;/P&gt;&lt;P&gt;Is there a way to do this self join technique in QlikView?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 May 2010 12:43:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-Moving-Average-within-a-Script/m-p/165207#M37612</guid>
      <dc:creator>r3iuk</dc:creator>
      <dc:date>2010-05-26T12:43:52Z</dc:date>
    </item>
  </channel>
</rss>

