<?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: Moving Annual Average in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Moving-Annual-Average/m-p/257646#M97370</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mike,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your fiscal year runs from Jul through June you can still sort by month.&amp;nbsp; First you need to associate the month number with a the month name by doing an inline load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DisplayMonth:&lt;/P&gt;&lt;P&gt;Load * Inline [&lt;/P&gt;&lt;P&gt;MONTH,MonthName&lt;/P&gt;&lt;P&gt;1, Jul&lt;/P&gt;&lt;P&gt;2, Aug&lt;/P&gt;&lt;P&gt;3, Sep&lt;/P&gt;&lt;P&gt;4, Oct&lt;/P&gt;&lt;P&gt;5, Nov&lt;/P&gt;&lt;P&gt;6, Dec&lt;/P&gt;&lt;P&gt;7, Jan&lt;/P&gt;&lt;P&gt;8, Feb&lt;/P&gt;&lt;P&gt;9, Mar&lt;/P&gt;&lt;P&gt;10, Apr&lt;/P&gt;&lt;P&gt;11, May&lt;/P&gt;&lt;P&gt;12, Jun&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next use the AddMonths function to look for anything in the last 12 months.&amp;nbsp; In the example I am looking for anything with an order date greater than 1 year ago today.&amp;nbsp; With this formula I can get a running total for the previous 12 months.&amp;nbsp; You could also just query data for the last 12 months as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;avg(if(ORDERDATE &amp;gt; addmonths(today(),-12), Amount))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Jul 2011 19:35:22 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-07-05T19:35:22Z</dc:date>
    <item>
      <title>Moving Annual Average</title>
      <link>https://community.qlik.com/t5/QlikView/Moving-Annual-Average/m-p/257645#M97369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What's the best way to get MAA on a chart?&amp;nbsp; MAA is the "Moving Annual Average" and uses prior data that spans more than one year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if I want to display on a chart...the last 12 months...it has to be sorted by time, not text?&amp;nbsp; But the time for the current year is older than the previous year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The chart would need to display in this order:&amp;nbsp; Jul, Aug, Sep, Oct, Nov, Dec, Jan, Feb, Mar, Apr, May, Jun.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it can't be sorted by text, right?&amp;nbsp; Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2011 18:20:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Moving-Annual-Average/m-p/257645#M97369</guid>
      <dc:creator>marsmike</dc:creator>
      <dc:date>2011-07-05T18:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Annual Average</title>
      <link>https://community.qlik.com/t5/QlikView/Moving-Annual-Average/m-p/257646#M97370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mike,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your fiscal year runs from Jul through June you can still sort by month.&amp;nbsp; First you need to associate the month number with a the month name by doing an inline load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DisplayMonth:&lt;/P&gt;&lt;P&gt;Load * Inline [&lt;/P&gt;&lt;P&gt;MONTH,MonthName&lt;/P&gt;&lt;P&gt;1, Jul&lt;/P&gt;&lt;P&gt;2, Aug&lt;/P&gt;&lt;P&gt;3, Sep&lt;/P&gt;&lt;P&gt;4, Oct&lt;/P&gt;&lt;P&gt;5, Nov&lt;/P&gt;&lt;P&gt;6, Dec&lt;/P&gt;&lt;P&gt;7, Jan&lt;/P&gt;&lt;P&gt;8, Feb&lt;/P&gt;&lt;P&gt;9, Mar&lt;/P&gt;&lt;P&gt;10, Apr&lt;/P&gt;&lt;P&gt;11, May&lt;/P&gt;&lt;P&gt;12, Jun&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next use the AddMonths function to look for anything in the last 12 months.&amp;nbsp; In the example I am looking for anything with an order date greater than 1 year ago today.&amp;nbsp; With this formula I can get a running total for the previous 12 months.&amp;nbsp; You could also just query data for the last 12 months as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;avg(if(ORDERDATE &amp;gt; addmonths(today(),-12), Amount))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2011 19:35:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Moving-Annual-Average/m-p/257646#M97370</guid>
      <dc:creator />
      <dc:date>2011-07-05T19:35:22Z</dc:date>
    </item>
  </channel>
</rss>

