<?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: get past year data in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788060#M1034830</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi arul,&lt;/P&gt;&lt;P&gt;If I selected 2013 in my year list box, is it showing 2012 data for the result?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Jan 2015 09:13:19 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-01-14T09:13:19Z</dc:date>
    <item>
      <title>get past year data</title>
      <link>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788055#M1034820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;when I selected 2014 in my year list box, I want to get the 2013 sales data. How can I do this in a chart expression?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 08:13:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788055#M1034820</guid>
      <dc:creator />
      <dc:date>2015-01-14T08:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: get past year data</title>
      <link>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788056#M1034821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sum({&amp;lt;Yr={$(=max(Yr) -1)}&amp;gt;} data)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yr is your year field,&amp;nbsp; data is the field you are summing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 08:21:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788056#M1034821</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2015-01-14T08:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: get past year data</title>
      <link>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788057#M1034824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;like this&lt;/P&gt;&lt;P&gt;sum({&amp;lt;year={$(=max(year)-1)}&amp;gt;}sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 08:34:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788057#M1034824</guid>
      <dc:creator>arulsettu</dc:creator>
      <dc:date>2015-01-14T08:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: get past year data</title>
      <link>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788058#M1034826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;max(year) means current year or selected year?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 08:59:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788058#M1034826</guid>
      <dc:creator />
      <dc:date>2015-01-14T08:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: get past year data</title>
      <link>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788059#M1034828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if your year field like this&lt;/P&gt;&lt;P&gt;2011,2012,2013,2014&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;max(years) will give 2014&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 09:01:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788059#M1034828</guid>
      <dc:creator>arulsettu</dc:creator>
      <dc:date>2015-01-14T09:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: get past year data</title>
      <link>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788060#M1034830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi arul,&lt;/P&gt;&lt;P&gt;If I selected 2013 in my year list box, is it showing 2012 data for the result?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 09:13:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788060#M1034830</guid>
      <dc:creator />
      <dc:date>2015-01-14T09:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: get past year data</title>
      <link>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788061#M1034832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes based on your selection it will give previous year&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 09:14:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788061#M1034832</guid>
      <dc:creator>arulsettu</dc:creator>
      <dc:date>2015-01-14T09:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: get past year data</title>
      <link>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788062#M1034833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;for curren year =Max(Year) =2014&lt;/P&gt;&lt;P&gt;For Prev Year =Max(Year)-1=2013&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in set analysis you need to define like below&amp;nbsp; and also include year=&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Year={$(=Max(Year)-1)},Year=&amp;gt;}value)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 09:15:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788062#M1034833</guid>
      <dc:creator>sunilkumarqv</dc:creator>
      <dc:date>2015-01-14T09:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: get past year data</title>
      <link>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788063#M1034834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But the problem is when I selected year=2014 and month=12, I m getting same results for the two columns. why is that?&lt;/P&gt;&lt;P&gt;these are my expressions in my chart.&lt;/P&gt;&lt;P&gt;Num(Sum({&amp;lt;Year={'$(=Max(Year)-1)'},Year=&amp;gt;}Retail_Sale_Qty),'#,##0') - prev year&lt;/P&gt;&lt;P&gt;Num(Sum(Retail_Sale_Qty),'#,##0') - selected year&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 09:29:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788063#M1034834</guid>
      <dc:creator />
      <dc:date>2015-01-14T09:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: get past year data</title>
      <link>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788064#M1034835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Num(Sum({&amp;lt;Year={'$(=Max(Year)-1)'}&amp;gt;}Retail_Sale_Qty),'#,##0') - prev year&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Num(Sum(Retail_Sale_Qty),'#,##0')&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Regards&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ASHFAQ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 09:31:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788064#M1034835</guid>
      <dc:creator>ashfaq_haseeb</dc:creator>
      <dc:date>2015-01-14T09:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: get past year data</title>
      <link>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788065#M1034836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333339691162px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Include 'Month= ' as well &lt;/P&gt;&lt;P style="font-size: 13.3333339691162px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Num(Sum({&amp;lt;Year={'$(=Max(Year)-1)'},Year=&lt;STRONG&gt;,Month=&lt;/STRONG&gt;&amp;gt;}Retail_Sale_Qty),'#,##0') - prev year&lt;/P&gt;&lt;P style="font-size: 13.3333339691162px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Num(Sum(Retail_Sale_Qty),'#,##0') - selected year&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 09:33:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788065#M1034836</guid>
      <dc:creator>sunilkumarqv</dc:creator>
      <dc:date>2015-01-14T09:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: get past year data</title>
      <link>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788066#M1034837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sunil,&lt;/P&gt;&lt;P&gt;I can't neglect the month because I want december month sales data&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 09:36:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788066#M1034837</guid>
      <dc:creator />
      <dc:date>2015-01-14T09:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: get past year data</title>
      <link>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788067#M1034838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;its not month restriction that intense to trigger will happen have try and let me no&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 09:40:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788067#M1034838</guid>
      <dc:creator>sunilkumarqv</dc:creator>
      <dc:date>2015-01-14T09:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: get past year data</title>
      <link>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788068#M1034839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;my problem is still the same&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 10:29:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788068#M1034839</guid>
      <dc:creator />
      <dc:date>2015-01-14T10:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: get past year data</title>
      <link>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788069#M1034840</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;did you try my solution?&lt;/P&gt;&lt;P&gt;If possible share sample app&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;ASHFAQ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 10:30:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788069#M1034840</guid>
      <dc:creator>ashfaq_haseeb</dc:creator>
      <dc:date>2015-01-14T10:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: get past year data</title>
      <link>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788070#M1034841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried, but no change&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 10:42:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788070#M1034841</guid>
      <dc:creator />
      <dc:date>2015-01-14T10:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: get past year data</title>
      <link>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788071#M1034842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please find the attached QVW&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 11:26:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788071#M1034842</guid>
      <dc:creator />
      <dc:date>2015-01-14T11:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: get past year data</title>
      <link>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788072#M1034843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also simple way is using Only,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;F.e. you select year 2014, there will be expression only(year)-1, that will handle it,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14212411769652959" jivemacro_uid="_14212411769652959" modifiedtitle="true"&gt;
&lt;P&gt;sum({&amp;lt;year={$(=Only(year))}&amp;gt;} Sales) //First expr that calculates selected year,&lt;/P&gt;
&lt;P&gt;sum({&amp;lt;year={$(=Only(year)-1)}&amp;gt;} Sales) //Second expr that calculates year-1,&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;='Sales '&amp;amp;Only(year_sale) // First expr to label calculation for selected year,&lt;/P&gt;
&lt;P&gt;='Sales '&amp;amp;(Only(year_sale)-1) // Second expr to lavel calculation for year-1,&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For ease of use you can on general tab of chart properties identify Calculation condition, f.e. Count(DISTINCT year_sale)=1 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This means, that chart will shown up only when you select needed (starting) year which will be the basis to count previous year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget to set ERROR message that will helps the user choose the year, go to Error messages on General tab of chart properties, and further locate Calculation condition unfulfilled and set reminer for something like that: Please select sales year. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;User will see the message in chart, further select the year 2015, and he will see results for 2015 and 2014, if he selects, f.e. 2013, he will see 2013 vs. 2012.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it also will help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 14:21:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788072#M1034843</guid>
      <dc:creator>marchoctober</dc:creator>
      <dc:date>2015-01-14T14:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: get past year data</title>
      <link>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788073#M1034844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dushan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this expression&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sum({&amp;lt;Year={$(=(Max(Year)-1))},Month=,Quarter=, Week=, Date=&amp;gt;}value)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Replace &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Month,Quarter, Week, Date with corresponding fields in your dashboard.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 15:31:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788073#M1034844</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2015-01-14T15:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: get past year data</title>
      <link>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788074#M1034845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks all&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2015 10:10:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/get-past-year-data/m-p/788074#M1034845</guid>
      <dc:creator />
      <dc:date>2015-01-22T10:10:00Z</dc:date>
    </item>
  </channel>
</rss>

