<?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: Range of years in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Range-of-years/m-p/1418535#M428261</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another way of doing the same is this expression calculates the Revenue from current year to the last 5 years with addmonths to -60 months dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=Sum({&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Year&lt;/SPAN&gt; = {"&amp;gt;=$(=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vMinYear&lt;/SPAN&gt;)&amp;nbsp;&amp;nbsp; &amp;lt;=$(=Year(Addmonths(Today(),-60))) "} &amp;gt;} &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Revenue Amt]/1000 &lt;/SPAN&gt;)&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Aug 2017 14:34:38 GMT</pubDate>
    <dc:creator>its_anandrjs</dc:creator>
    <dc:date>2017-08-31T14:34:38Z</dc:date>
    <item>
      <title>Range of years</title>
      <link>https://community.qlik.com/t5/QlikView/Range-of-years/m-p/1418532#M428258</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 want to display data from 5 years back to the current year. Therefore, I do not want the expression to be fixed in the sense that it shows 2012-2017 because next year I want it to show 2013-2018. Is there a variable I could create (I already have a variable vCurrentYear) or an expression I could use to show a range of dates?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right now, this is the portion of the expression and it only shows the data point for 2017 because of vCurrentYear:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=(&lt;/SPAN&gt;&lt;STRONG style=": ; color: #808080; font-size: 8pt;"&gt;&lt;EM&gt;$(vCurrentYear)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Revenue Amt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;/1000)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thank you for your help!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Aug 2017 12:42:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Range-of-years/m-p/1418532#M428258</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-31T12:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: Range of years</title>
      <link>https://community.qlik.com/t5/QlikView/Range-of-years/m-p/1418533#M428259</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;Instead you can create a variable which stores the minimum year dynamically and then use it like below in expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Year={"&amp;gt;=$(vMinYear)"}&amp;gt;}[Revenue Amt]/1000)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Aug 2017 14:06:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Range-of-years/m-p/1418533#M428259</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2017-08-31T14:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: Range of years</title>
      <link>https://community.qlik.com/t5/QlikView/Range-of-years/m-p/1418534#M428260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(&lt;SPAN style="color: #ff0000;"&gt;{$&amp;lt;Year=("$(='&amp;gt;=' &amp;amp; (Year(Today()) - 4) &amp;amp; '&amp;lt;=' &amp;amp; Year(Today()))"}&amp;gt;}&lt;/SPAN&gt; [Revenue Amt]/1000)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you put this in a text box object (or KPI object in Qlik Sense), you should see this&lt;/P&gt;&lt;P&gt;&amp;gt;=2013&amp;lt;=2017&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Aug 2017 14:08:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Range-of-years/m-p/1418534#M428260</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-08-31T14:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: Range of years</title>
      <link>https://community.qlik.com/t5/QlikView/Range-of-years/m-p/1418535#M428261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another way of doing the same is this expression calculates the Revenue from current year to the last 5 years with addmonths to -60 months dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=Sum({&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Year&lt;/SPAN&gt; = {"&amp;gt;=$(=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vMinYear&lt;/SPAN&gt;)&amp;nbsp;&amp;nbsp; &amp;lt;=$(=Year(Addmonths(Today(),-60))) "} &amp;gt;} &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Revenue Amt]/1000 &lt;/SPAN&gt;)&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Aug 2017 14:34:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Range-of-years/m-p/1418535#M428261</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2017-08-31T14:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: Range of years</title>
      <link>https://community.qlik.com/t5/QlikView/Range-of-years/m-p/1418536#M428262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or simply like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;=Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;({$&amp;lt;Year = ('&amp;gt;=&lt;EM style="font-weight: inherit; font-size: 10.6667px; font-family: inherit;"&gt;$(&lt;/EM&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;=&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;$(vCurrentYear)-4&lt;/SPAN&gt;&lt;EM style=": ; color: #000000; font-size: 10.6667px; font-family: inherit; font-weight: inherit;"&gt;)'&lt;/EM&gt;}&amp;gt;} [Revenue Amt]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: 'courier new', courier;"&gt;/1000)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-size: 8pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-size: 8pt; font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;The blue equal sign in the $-sign expansion forces the content to be treated as an expression. If your variable vCurrentYear is correctly set, the calculation will result in a value indicating four years ago.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Aug 2017 14:41:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Range-of-years/m-p/1418536#M428262</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2017-08-31T14:41:31Z</dc:date>
    </item>
  </channel>
</rss>

