<?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: set analysis - pulling last years data with a variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/set-analysis-pulling-last-years-data-with-a-variable/m-p/1117961#M903260</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;=count(distinct {$&amp;lt;RegYear = {'$(v_year)-1 '}&amp;gt;} person_id)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Jul 2016 10:32:27 GMT</pubDate>
    <dc:creator>sushil353</dc:creator>
    <dc:date>2016-07-08T10:32:27Z</dc:date>
    <item>
      <title>set analysis - pulling last years data with a variable</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-pulling-last-years-data-with-a-variable/m-p/1117960#M903259</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;Just trying to get some data using set analysis but running into a problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a few buttons at the top where i can set the year i'm interested in&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and putting this expression in&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({$&amp;lt;RegYear={$(v_year)}&amp;gt;} distinct person_id)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;works fine regardless of the year I select. e.g. 2016, 2015, 2014 , all bring back data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when i add a 2nd expression which tries to pull the previous years data using the expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({$&amp;lt;RegYear = {$(v_year - 1) }&amp;gt;} distinct person_id)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the output is just a row of 0's&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone spot any issues with this 2nd formulas please&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-pulling-last-years-data-with-a-variable/m-p/1117960#M903259</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis - pulling last years data with a variable</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-pulling-last-years-data-with-a-variable/m-p/1117961#M903260</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;=count(distinct {$&amp;lt;RegYear = {'$(v_year)-1 '}&amp;gt;} person_id)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2016 10:32:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-pulling-last-years-data-with-a-variable/m-p/1117961#M903260</guid>
      <dc:creator>sushil353</dc:creator>
      <dc:date>2016-07-08T10:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis - pulling last years data with a variable</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-pulling-last-years-data-with-a-variable/m-p/1117962#M903262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;=count({$&amp;lt;RegYear = {$(=$(v_year) - 1) }&amp;gt;} distinct person_id)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2016 10:41:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-pulling-last-years-data-with-a-variable/m-p/1117962#M903262</guid>
      <dc:creator>antoniotiman</dc:creator>
      <dc:date>2016-07-08T10:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis - pulling last years data with a variable</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-pulling-last-years-data-with-a-variable/m-p/1117963#M903264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Antonio, works perfect&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2016 11:26:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-pulling-last-years-data-with-a-variable/m-p/1117963#M903264</guid>
      <dc:creator />
      <dc:date>2016-07-08T11:26:45Z</dc:date>
    </item>
  </channel>
</rss>

