<?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: Use current/Prior year in Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Use-current-Prior-year-in-Set-Analysis/m-p/33062#M5580</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;=Count({&amp;lt;Month,Year = {"$(=If(Year(AddMonths(AsOfDate, -1)) = Year(AddMonths(AsOfDate, 0)), Year(AddMonths(AsOfDate, 0)), Year(AddMonths(AsOfDate, -1))))"}&amp;gt;} Products)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Feb 2018 19:03:38 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2018-02-15T19:03:38Z</dc:date>
    <item>
      <title>Use current/Prior year in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Use-current-Prior-year-in-Set-Analysis/m-p/33061#M5579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I use the following in a text box the result displayed is 2017 (or 2018, depending on AsOfDate) :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If(Year(AddMonths(AsOfDate,-1))=Year(AddMonths(AsOfDate,0)),Year(AddMonths(AsOfDate,0)),Year(AddMonths(AsOfDate,-1)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to use this in a set analysis statement, though. I tried the following without success:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Count( { &amp;lt;Month=,Year-{"=If(Year(AddMonths(AsOfDate,-1))=Year(AddMonths(AsOfDate,0)),Year(AddMonths(AsOfDate,0)),Year(AddMonths(AsOfDate,-1)))"} &amp;gt;} Products)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2018 18:56:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-current-Prior-year-in-Set-Analysis/m-p/33061#M5579</guid>
      <dc:creator>nickedw0</dc:creator>
      <dc:date>2018-02-15T18:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: Use current/Prior year in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Use-current-Prior-year-in-Set-Analysis/m-p/33062#M5580</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;=Count({&amp;lt;Month,Year = {"$(=If(Year(AddMonths(AsOfDate, -1)) = Year(AddMonths(AsOfDate, 0)), Year(AddMonths(AsOfDate, 0)), Year(AddMonths(AsOfDate, -1))))"}&amp;gt;} Products)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2018 19:03:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-current-Prior-year-in-Set-Analysis/m-p/33062#M5580</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-02-15T19:03:38Z</dc:date>
    </item>
  </channel>
</rss>

