<?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: getting last 7 years in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/getting-last-7-years/m-p/326662#M120251</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls can you see the attached sample QVW file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you mentioned in last line is correct. I need to display those years in a listbox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to display last 7 years in a single variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Jun 2011 13:41:24 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-06-28T13:41:24Z</dc:date>
    <item>
      <title>getting last 7 years</title>
      <link>https://community.qlik.com/t5/QlikView/getting-last-7-years/m-p/326660#M120249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi to all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can i generate last 7 years in a Single variable&amp;nbsp; dynamically. Either in macro or editscript.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on Current Year it should calculate last 7 Years.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current Year =2011 , then last 7 years should display, as same below. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ABCD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2010&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2009&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2008&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2007&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2006&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2005&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2004&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Current Year =2012 then last 7 years is 2011 to 2003.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i work on this ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2011 12:09:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/getting-last-7-years/m-p/326660#M120249</guid>
      <dc:creator />
      <dc:date>2011-06-28T12:09:25Z</dc:date>
    </item>
    <item>
      <title>getting last 7 years</title>
      <link>https://community.qlik.com/t5/QlikView/getting-last-7-years/m-p/326661#M120250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not quite sure what you want to achieve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you want to set a (comma separated) list of year values to a variable or use a certain period (last 7 years) for limiting the display / calculation of a dimension / expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From your post, I would assume the first; is Current year another variable /selection or do you want to use the current timestamp?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want the latter, I would use set analysis and limit for example dimension Year to the last 7 years.&lt;/P&gt;&lt;P&gt;e.g. sum( {$&amp;lt;Year = {"&amp;gt;= $(=year(now())-8) &amp;lt;= $(=year(now())-1)"}&amp;gt;} Sales )&lt;/P&gt;&lt;P&gt;[Be aware that you might need to set other time dimensions to empty selection if needed within the set, depending your data model]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Besides I think the last seven year for current year 2012 should be 2011 to &lt;STRONG&gt;2005&lt;/STRONG&gt;, right?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2011 13:32:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/getting-last-7-years/m-p/326661#M120250</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-06-28T13:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: getting last 7 years</title>
      <link>https://community.qlik.com/t5/QlikView/getting-last-7-years/m-p/326662#M120251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls can you see the attached sample QVW file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you mentioned in last line is correct. I need to display those years in a listbox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to display last 7 years in a single variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2011 13:41:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/getting-last-7-years/m-p/326662#M120251</guid>
      <dc:creator />
      <dc:date>2011-06-28T13:41:24Z</dc:date>
    </item>
  </channel>
</rss>

