<?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 12 Month Moving Average Set Analysis-Plotting onto a Graph in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/12-Month-Moving-Average-Set-Analysis-Plotting-onto-a-Graph/m-p/213550#M500266</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jack - It would be good if you can post QV document with some sample data. I am sure one of us will guide you. The idea is to build a robust data model to accept data month on month and code re-usability.&lt;/P&gt;&lt;P&gt;Just to give you some ideas... here are few points to consider.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Calculate the CurrentYear &amp;amp; PreviousYear by variables (Something like this...)&lt;/P&gt;&lt;P style="font-weight: bold"&gt;CurrentYear : Max({1} Year)&lt;/P&gt;&lt;P style="font-weight: bold"&gt;PreviousYear : Max({1} Year) - 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Calculate CurrentMonth by variables (See below...)&lt;/P&gt;&lt;P style="font-weight: bold"&gt;CurrentMonth : Max({1&amp;lt;Year = {$(=$(vMaxYear))}&amp;gt;} MonthNumber)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Use the variables in Set Analysis&lt;/P&gt;&lt;P&gt;&lt;B&gt;Sum({1&amp;lt;Year={$(=($(vPreviousYear)))}, MonthNumber={$(=($(vCurrentMonthNumber)))}&amp;gt;} Sales))&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps!&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Apr 2011 13:53:53 GMT</pubDate>
    <dc:creator>IAMDV</dc:creator>
    <dc:date>2011-04-13T13:53:53Z</dc:date>
    <item>
      <title>12 Month Moving Average Set Analysis-Plotting onto a Graph</title>
      <link>https://community.qlik.com/t5/QlikView/12-Month-Moving-Average-Set-Analysis-Plotting-onto-a-Graph/m-p/213549#M500265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I'm relatively new to Qlikview and having a little trouble with a set analysis that I am working on.&lt;/P&gt;&lt;P&gt;What I am trying to do is a 12 month moving average. I have look at the forums and managed to create it in a table using the following set analysis:-&lt;/P&gt;&lt;P&gt;=rangeavg(after(sum(sin_Sales),0,12))&lt;/P&gt;&lt;P&gt;However when trying to apply this to a chart it stops working.&lt;/P&gt;&lt;P&gt;Any help is gratefully recieved.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jack&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 13:42:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/12-Month-Moving-Average-Set-Analysis-Plotting-onto-a-Graph/m-p/213549#M500265</guid>
      <dc:creator />
      <dc:date>2011-04-13T13:42:18Z</dc:date>
    </item>
    <item>
      <title>12 Month Moving Average Set Analysis-Plotting onto a Graph</title>
      <link>https://community.qlik.com/t5/QlikView/12-Month-Moving-Average-Set-Analysis-Plotting-onto-a-Graph/m-p/213550#M500266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jack - It would be good if you can post QV document with some sample data. I am sure one of us will guide you. The idea is to build a robust data model to accept data month on month and code re-usability.&lt;/P&gt;&lt;P&gt;Just to give you some ideas... here are few points to consider.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Calculate the CurrentYear &amp;amp; PreviousYear by variables (Something like this...)&lt;/P&gt;&lt;P style="font-weight: bold"&gt;CurrentYear : Max({1} Year)&lt;/P&gt;&lt;P style="font-weight: bold"&gt;PreviousYear : Max({1} Year) - 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Calculate CurrentMonth by variables (See below...)&lt;/P&gt;&lt;P style="font-weight: bold"&gt;CurrentMonth : Max({1&amp;lt;Year = {$(=$(vMaxYear))}&amp;gt;} MonthNumber)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Use the variables in Set Analysis&lt;/P&gt;&lt;P&gt;&lt;B&gt;Sum({1&amp;lt;Year={$(=($(vPreviousYear)))}, MonthNumber={$(=($(vCurrentMonthNumber)))}&amp;gt;} Sales))&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps!&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 13:53:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/12-Month-Moving-Average-Set-Analysis-Plotting-onto-a-Graph/m-p/213550#M500266</guid>
      <dc:creator>IAMDV</dc:creator>
      <dc:date>2011-04-13T13:53:53Z</dc:date>
    </item>
    <item>
      <title>12 Month Moving Average Set Analysis-Plotting onto a Graph</title>
      <link>https://community.qlik.com/t5/QlikView/12-Month-Moving-Average-Set-Analysis-Plotting-onto-a-Graph/m-p/213551#M500267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jack - Have you got chance to work on this? I am curious to know the outcome...&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2011 09:48:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/12-Month-Moving-Average-Set-Analysis-Plotting-onto-a-Graph/m-p/213551#M500267</guid>
      <dc:creator>IAMDV</dc:creator>
      <dc:date>2011-04-14T09:48:51Z</dc:date>
    </item>
    <item>
      <title>12 Month Moving Average Set Analysis-Plotting onto a Graph</title>
      <link>https://community.qlik.com/t5/QlikView/12-Month-Moving-Average-Set-Analysis-Plotting-onto-a-Graph/m-p/213552#M500268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi DV,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply, Apologies for not replying sooner.&lt;/P&gt;&lt;P&gt;I have had a look at this and afraid your example doesn't work. I'm using a data model designed by a colleague of mine and cannot work out a way to add the CurrentMonth variables to it (I can't see the code behind it).&lt;/P&gt;&lt;P&gt;Is there a way that this can run without the current month feature, for example using something like this?&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;Sum(if(Date&amp;gt;addmonths(Date(today()-Day(Today())),-12),Sales).&lt;/P&gt;&lt;P&gt;This displays sales for the previous 12 months, however when trying to average the results is incorrect.&lt;/P&gt;&lt;P&gt;Thanks For your help, Sorry I oculdn't work it out with your previous example!&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jack&lt;BR /&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2011 10:07:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/12-Month-Moving-Average-Set-Analysis-Plotting-onto-a-Graph/m-p/213552#M500268</guid>
      <dc:creator />
      <dc:date>2011-04-14T10:07:57Z</dc:date>
    </item>
    <item>
      <title>12 Month Moving Average Set Analysis-Plotting onto a Graph</title>
      <link>https://community.qlik.com/t5/QlikView/12-Month-Moving-Average-Set-Analysis-Plotting-onto-a-Graph/m-p/213553#M500269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It appears the answer is on a different post, See link below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://community.qlik.com/message/56320#56320"&gt;http://community.qlik.com/message/56320#56320&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hopefully this can help the 1000+ viewers of this post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jack&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jun 2011 09:21:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/12-Month-Moving-Average-Set-Analysis-Plotting-onto-a-Graph/m-p/213553#M500269</guid>
      <dc:creator />
      <dc:date>2011-06-10T09:21:19Z</dc:date>
    </item>
  </channel>
</rss>

