<?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 Show only last 12 Month with Dimension YearMonth in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Show-only-last-12-Month-with-Dimension-YearMonth/m-p/342620#M493796</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Heri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think set analysis is the answer for your problem. I would create a sort order number for your YearMonth field. You can then use something like this in your set analysis expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum( {&amp;lt; YearMonth=, YearMonthOrder={$(v_12_month_set)} &amp;gt;} Amount), where v_12_month_set is a variable having the expressions for your sort order. It should be something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= '"&amp;lt;=' &amp;amp; Max(YearMonthOrder) &amp;amp; ' &amp;gt;=' &amp;amp; Max(YearMonthOrder)-11 &amp;amp; '"'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Teemu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 May 2012 06:51:16 GMT</pubDate>
    <dc:creator>teempi</dc:creator>
    <dc:date>2012-05-09T06:51:16Z</dc:date>
    <item>
      <title>Show only last 12 Month with Dimension YearMonth</title>
      <link>https://community.qlik.com/t5/QlikView/Show-only-last-12-Month-with-Dimension-YearMonth/m-p/342619#M493795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to show sum of amount in chart (bar,line). Dimension I must use is YearMonth, then the case is when I click 'Jan' and Year '2012', the chart show only amount of last 12 month. Jan-2012, Dec-2011, Nov-2011, ... Feb-2011. Then, if I select Month from Jan-Apil, it will show the amount of last 12 Month from Max Month I select (April). I had try to use dimension limit and max show value, but it can't be like that. I want to set it in expression. Can you help me? Thanks before.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2012 02:04:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-only-last-12-Month-with-Dimension-YearMonth/m-p/342619#M493795</guid>
      <dc:creator />
      <dc:date>2012-05-09T02:04:42Z</dc:date>
    </item>
    <item>
      <title>Show only last 12 Month with Dimension YearMonth</title>
      <link>https://community.qlik.com/t5/QlikView/Show-only-last-12-Month-with-Dimension-YearMonth/m-p/342620#M493796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Heri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think set analysis is the answer for your problem. I would create a sort order number for your YearMonth field. You can then use something like this in your set analysis expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum( {&amp;lt; YearMonth=, YearMonthOrder={$(v_12_month_set)} &amp;gt;} Amount), where v_12_month_set is a variable having the expressions for your sort order. It should be something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= '"&amp;lt;=' &amp;amp; Max(YearMonthOrder) &amp;amp; ' &amp;gt;=' &amp;amp; Max(YearMonthOrder)-11 &amp;amp; '"'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Teemu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2012 06:51:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-only-last-12-Month-with-Dimension-YearMonth/m-p/342620#M493796</guid>
      <dc:creator>teempi</dc:creator>
      <dc:date>2012-05-09T06:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Show only last 12 Month with Dimension YearMonth</title>
      <link>https://community.qlik.com/t5/QlikView/Show-only-last-12-Month-with-Dimension-YearMonth/m-p/342621#M493797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Heri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what I did was creating a variable as end date and from that a starting date for the x-axis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vEndDate: =today()&lt;/P&gt;&lt;P&gt;vStartDate: =addmonth(today(), -12)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="qv1.bmp" class="jive-image" src="https://community.qlik.com/legacyfs/online/47324_qv1.bmp" style="width: 620px; height: 484px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;That gives me the last 12 month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is that I do a rolling 12 month calculation, which gives the correct value for the first month that is shown. But, it doesn't scale the y-axis correctly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Oct 2013 08:38:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-only-last-12-Month-with-Dimension-YearMonth/m-p/342621#M493797</guid>
      <dc:creator />
      <dc:date>2013-10-08T08:38:19Z</dc:date>
    </item>
  </channel>
</rss>

