<?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 Showing values for previous 12 months/periods using set analysis? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218396#M500642</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I understand the point - if it is not in date format, qlickview will not be able to understand that subtracting 1 from January (201101) value should give December (201012) and not 201100.&lt;/P&gt;&lt;P&gt;I do have another field created_date with the exact date already in correct format. I should use this instead.&lt;/P&gt;&lt;P&gt;But I'm not sure how to sum all quantity for one month and previous month. Should I determine the current month, and then subtract 1 from that?&lt;/P&gt;&lt;P&gt;Can I use Month() function in anyway? Or do you have a good solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my code example in the first post, the field created_per should be changed to created_date. This will give the exact date, but how do I now calculate this per month?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Feb 2011 09:01:33 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-02-16T09:01:33Z</dc:date>
    <item>
      <title>Showing values for previous 12 months/periods using set analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218392#M500638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to make a chart with the sum of "quantity" for the current period and for 11 previous periods. I.e. 12 months/periods.&lt;/P&gt;&lt;P&gt;I'm using the following expression in a chart:&lt;/P&gt;&lt;P style="font-style: italic"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;sum({$&amp;lt;created_per={&lt;B&gt;&lt;I&gt;$(=Max(created_per))&lt;/I&gt;&lt;/B&gt;}&amp;gt;}quantity)&lt;/P&gt;&lt;P&gt;created_per is the period in format YYYYMM. This expression works fine, and shows the latest period in my chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if i write expressions like this for each record:&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;= sum({$&amp;lt;created_per={&lt;B&gt;&lt;I&gt;$(=Max(created_per)-1)&lt;/I&gt;&lt;/B&gt;}&amp;gt;}quantity)&lt;/P&gt;&lt;P&gt;= sum({$&amp;lt;created_per={&lt;B&gt;&lt;I&gt;$(=Max(created_per)-2)&lt;/I&gt;&lt;/B&gt;}&amp;gt;}quantity)&lt;/P&gt;&lt;P&gt;= sum({$&amp;lt;created_per={&lt;B&gt;&lt;I&gt;$(=Max(created_per)-3)&lt;/I&gt;&lt;/B&gt;}&amp;gt;}quantity)&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;It does not work, because when subtracting 1 from the period 201101, it becomes 201100 - which obviously is not a valid period. Instead of 201100 I would of course need to get 201012.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions for how to solve this? How do I refer to the previous record in the created_per "column".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Feb 2011 07:48:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218392#M500638</guid>
      <dc:creator />
      <dc:date>2011-02-16T07:48:56Z</dc:date>
    </item>
    <item>
      <title>Showing values for previous 12 months/periods using set analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218393#M500639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;whenever u use any calculation on date, use date function.&lt;/P&gt;&lt;P&gt;= sum({$&amp;lt;created_per={&lt;B&gt;&lt;I&gt;$(=date(Max(created_per))-1)&lt;/I&gt;&lt;/B&gt;}&amp;gt;}quantity)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;or&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;= sum({$&amp;lt;created_per={&lt;B&gt;&lt;I&gt;$(=date(date(Max(created_per))-1))&lt;/I&gt;&lt;/B&gt;}&amp;gt;}quantity)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Feb 2011 08:00:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218393#M500639</guid>
      <dc:creator>maneshkhottcpl</dc:creator>
      <dc:date>2011-02-16T08:00:44Z</dc:date>
    </item>
    <item>
      <title>Showing values for previous 12 months/periods using set analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218394#M500640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this also works until January (201101). When period is 201101 and I subtract 1, the result is that nothing shows on the graph as it tries to show period 201100 - instead of 201012.&lt;/P&gt;&lt;P&gt;Any workarounds?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Feb 2011 08:04:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218394#M500640</guid>
      <dc:creator />
      <dc:date>2011-02-16T08:04:37Z</dc:date>
    </item>
    <item>
      <title>Showing values for previous 12 months/periods using set analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218395#M500641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;The Date is not in datetime formate its in numeric formate in ur application.&lt;/P&gt;&lt;P&gt;Firsr u have to convert ur date in proper date formate using date(makedate(left(DateField,4),mid(DateField,5,2),right(DateField,2)),'YYYYMMDD')&lt;/P&gt;&lt;P&gt;better to use in variable.&lt;/P&gt;&lt;P&gt;If confussion please send me the ssample application i will surly help u.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Feb 2011 08:35:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218395#M500641</guid>
      <dc:creator>maneshkhottcpl</dc:creator>
      <dc:date>2011-02-16T08:35:20Z</dc:date>
    </item>
    <item>
      <title>Showing values for previous 12 months/periods using set analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218396#M500642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I understand the point - if it is not in date format, qlickview will not be able to understand that subtracting 1 from January (201101) value should give December (201012) and not 201100.&lt;/P&gt;&lt;P&gt;I do have another field created_date with the exact date already in correct format. I should use this instead.&lt;/P&gt;&lt;P&gt;But I'm not sure how to sum all quantity for one month and previous month. Should I determine the current month, and then subtract 1 from that?&lt;/P&gt;&lt;P&gt;Can I use Month() function in anyway? Or do you have a good solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my code example in the first post, the field created_per should be changed to created_date. This will give the exact date, but how do I now calculate this per month?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Feb 2011 09:01:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218396#M500642</guid>
      <dc:creator />
      <dc:date>2011-02-16T09:01:33Z</dc:date>
    </item>
    <item>
      <title>Showing values for previous 12 months/periods using set analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218397#M500643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Manesh, or somebody else. I have attached a sample file with data for 2010 and 2011.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Feb 2011 09:57:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218397#M500643</guid>
      <dc:creator />
      <dc:date>2011-02-16T09:57:45Z</dc:date>
    </item>
    <item>
      <title>Showing values for previous 12 months/periods using set analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218398#M500644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't believe this is so hard to achieve in QV, I have spent two days with this... [:'(]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Feb 2011 12:36:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218398#M500644</guid>
      <dc:creator />
      <dc:date>2011-02-16T12:36:58Z</dc:date>
    </item>
    <item>
      <title>Showing values for previous 12 months/periods using set analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218399#M500645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi W.&lt;/P&gt;&lt;P&gt;I would start by chaging your script into something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;LOAD Date(@1) as Date,&lt;BR /&gt; Year(@1) as Year,&lt;BR /&gt; Month(@1) as Month,&lt;BR /&gt; @2 as quantity&lt;BR /&gt;FROM&lt;BR /&gt;[Book1.xls]&lt;BR /&gt;(biff, no labels, table is Sheet1$);@2 as quantity&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;This way you make it easier onyourself to work with months and yours.&lt;BR /&gt;&lt;BR /&gt;See document.&lt;BR /&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Feb 2011 13:58:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218399#M500645</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-16T13:58:42Z</dc:date>
    </item>
    <item>
      <title>Showing values for previous 12 months/periods using set analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218400#M500646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dennis, thanks.&lt;/P&gt;&lt;P&gt;OK, so we load the dates as Months/Years, but that does not solve the problem.&lt;/P&gt;&lt;P&gt;The problem is, how do I present a bar chart with current month's sum of quantity, previous month's sum of quanity, and so on for a total of 12 previous months?&lt;/P&gt;&lt;P&gt;So far we only have the present month value, but we need the "rolling 12" values as well, i.e. the sum for each month for the previous 12 months in a barchart.&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Feb 2011 14:42:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218400#M500646</guid>
      <dc:creator />
      <dc:date>2011-02-16T14:42:05Z</dc:date>
    </item>
    <item>
      <title>Showing values for previous 12 months/periods using set analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218401#M500647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understand you correct the answer is in the new document.&lt;BR /&gt;&lt;BR /&gt;Let me know if this is what you are looking for ok?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Feb 2011 14:58:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218401#M500647</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-16T14:58:58Z</dc:date>
    </item>
    <item>
      <title>Showing values for previous 12 months/periods using set analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218402#M500648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I will play around with this to see if I can use this. I need to do some calculations in the quantity as well.&lt;/P&gt;&lt;P&gt;Could you share the steps for achieving this? I can see you are using "load order" as reversed. I guess that is important in order to achieve this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Feb 2011 16:36:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218402#M500648</guid>
      <dc:creator />
      <dc:date>2011-02-16T16:36:57Z</dc:date>
    </item>
    <item>
      <title>Showing values for previous 12 months/periods using set analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218403#M500649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;Sum({$&amp;lt;Year= ,Month= , Date={"&amp;gt;=$(=addmonths(monthstart(max(Date)),-11)) &amp;lt;=$(=(monthend(max(Date))))"}&amp;gt;} Sales))&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Feb 2011 16:54:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218403#M500649</guid>
      <dc:creator />
      <dc:date>2011-02-16T16:54:11Z</dc:date>
    </item>
    <item>
      <title>Showing values for previous 12 months/periods using set analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218404#M500650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Fernando, this code does not work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Feb 2011 17:36:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218404#M500650</guid>
      <dc:creator />
      <dc:date>2011-02-16T17:36:22Z</dc:date>
    </item>
    <item>
      <title>Showing values for previous 12 months/periods using set analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218405#M500651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;Try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;Sum({$&amp;lt;Year=, Month=, Date={"&amp;gt;=$(=addmonths(monthstart(Today()),-11)) &amp;lt;=$(=(monthend(Today(Date))))"}&amp;gt;} quantity)&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Feb 2011 17:48:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218405#M500651</guid>
      <dc:creator />
      <dc:date>2011-02-16T17:48:11Z</dc:date>
    </item>
    <item>
      <title>Showing values for previous 12 months/periods using set analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218406#M500652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My steps?&lt;BR /&gt;&lt;BR /&gt;First I made a field "MonthYear" in the loading script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;date(monthstart(@1), 'MMM-YYYY') AS MonthYear,&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;You need this to count the months over the years&lt;BR /&gt;&lt;BR /&gt;In the sort tab I set Load order in reverse just to reverse the month, so it starts with the last month.&lt;BR /&gt;You could also use: sort Numeric Value as Descending.&lt;/P&gt;&lt;P&gt;At last, in the presentation tab, I set Max visible Number to 12, so it will show the last 12 Months.&lt;/P&gt;&lt;P&gt;I hope I made it a bit clear.&lt;BR /&gt;If you have more questions, just ask.&lt;BR /&gt;&lt;BR /&gt;Good luck!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Feb 2011 20:15:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218406#M500652</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-16T20:15:31Z</dc:date>
    </item>
    <item>
      <title>Showing values for previous 12 months/periods using set analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218407#M500653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have worked with ideas from the answers I received. It seems one of the keys for my issue is to load the period as Date, and I use YYYYMM - in my datasource database the value was just a string.&lt;/P&gt;&lt;P&gt;I am now trying to implement this with some more advanced calculations. Getting closer to success...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Feb 2011 13:32:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218407#M500653</guid>
      <dc:creator />
      <dc:date>2011-02-17T13:32:45Z</dc:date>
    </item>
    <item>
      <title>Showing values for previous 12 months/periods using set analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218408#M500654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I am now using Fernando's example qvw.&lt;/P&gt;&lt;P&gt;I now would like to make another additional bar for each period, besides the existing bar.&lt;/P&gt;&lt;P&gt;This bar should show the average sum of the last 3 periods. I.e. for period Feb 2011 it should show the average sum for each period Feb+Jan+Dec&lt;/P&gt;&lt;P&gt;In other words: 20+26+40 = 86/3 = 28.67&lt;/P&gt;&lt;P&gt;So Feb-2011 would have two bars: 1) Current period quantity (value 20) and 2)Previous 3 period's average quantity (value 28.67)&lt;/P&gt;&lt;P&gt;Is this possible to achieve? I am not able to calculate this as it seems I am not able to define the previous period in the calculation as (MonthYear-1)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2011 10:55:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218408#M500654</guid>
      <dc:creator />
      <dc:date>2011-02-18T10:55:33Z</dc:date>
    </item>
    <item>
      <title>Showing values for previous 12 months/periods using set analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218409#M500655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i can't check what others have given in example applications. what i suggest is :&lt;/P&gt;&lt;P&gt;get a date field in LOAD as : LOAD Date(Date#(yourdatefield,'YYYYMM'),'MM-DD-YYYY') as Date&lt;/P&gt;&lt;P&gt;Then at front end use dimension : MonthName(Date), and expression as:&lt;BR /&gt;Sum({$&amp;lt;Year= ,Month= , Date={"&amp;gt;=$(=addmonths(monthstart(max(Date)),-11)) &amp;lt;=$(=(monthend(max(Date))))"}&amp;gt;} Sales)) ...as suggested by fernando.&lt;/P&gt;&lt;PRE style="margin:0px;"&gt;&lt;/PRE&gt;&lt;PRE style="margin:0px;"&gt;&lt;/PRE&gt;&lt;PRE style="margin:0px;"&gt;&lt;/PRE&gt;&lt;PRE style="margin:0px;"&gt;Hope this helps.&lt;/PRE&gt;&lt;PRE style="margin:0px;"&gt;&lt;/PRE&gt;&lt;PRE style="margin:0px;"&gt;&lt;/PRE&gt;&lt;PRE style="margin:0px;"&gt;Regards, tresesco&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2011 11:17:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218409#M500655</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2011-02-18T11:17:15Z</dc:date>
    </item>
    <item>
      <title>Showing values for previous 12 months/periods using set analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218410#M500656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tresesco, I do have a date field (formatted as YYYYMM).&lt;/P&gt;&lt;P&gt;And I can show the 12 previous periods now (in Fernando's file)&lt;/P&gt;&lt;P&gt;but I cannot calculate the average sum for past three periods and show that as a bar besides the quantity for the current perdiod. As explained in my last post - for every period I want the current quantiy for that period, and the average for the past three periods.&lt;/P&gt;&lt;P&gt;I am guessing this should be a fairly common task in reporting/BI using Qlikview, but I'm having a real hard time with this, although I am learning a lot while doing it. I appreciate all help I can get.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2011 12:44:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218410#M500656</guid>
      <dc:creator />
      <dc:date>2011-02-18T12:44:08Z</dc:date>
    </item>
    <item>
      <title>Showing values for previous 12 months/periods using set analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218411#M500657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Go through RangeAvg function, i believe it would help you get done (you might require Above/Below functions as well).&lt;/P&gt;&lt;P&gt;good luck.&lt;/P&gt;&lt;P&gt;Regards, tresesco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2011 12:53:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Showing-values-for-previous-12-months-periods-using-set-analysis/m-p/218411#M500657</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2011-02-18T12:53:07Z</dc:date>
    </item>
  </channel>
</rss>

