<?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: Date Comparison - SET ANALYSIS in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-Comparison-SET-ANALYSIS/m-p/753291#M268408</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gysbert.....you are fabulous ..... solution worked.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Shree Angane&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Jan 2015 20:33:49 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-01-22T20:33:49Z</dc:date>
    <item>
      <title>Date Comparison - SET ANALYSIS</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Comparison-SET-ANALYSIS/m-p/753287#M268404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using this below code to view DealId count for Current Year and Previous Year&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current Month:&lt;/P&gt;&lt;P&gt;=count({&amp;lt;MONTH=, Year={"=Date(max(Date),'YYYY')"}&amp;gt;} DealID) -- Works for Current&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Previous Month:&lt;/P&gt;&lt;P&gt;=count({&amp;lt;MONTH=, Year={"=Date(AddYears(max(Date),-1),'YYYY')"}&amp;gt;} DealID) -- Does not work for previous. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code works fine for Current Month. To get Previous Month I use AddYears(Max(Date),-1) code to fetch previous year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately Previous Month code does not work and give me Current Month Data.instead.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can somebody help me out with this.....AddYears stuff...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shree Angane&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2015 18:40:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Comparison-SET-ANALYSIS/m-p/753287#M268404</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-22T18:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: Date Comparison - SET ANALYSIS</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Comparison-SET-ANALYSIS/m-p/753288#M268405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Year={"=Date(AddYears(max(Date),-1),'YYYY')"} selects the same month, but a year earlier. If you want the previous month you need to use the AddMonths function instead.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2015 19:50:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Comparison-SET-ANALYSIS/m-p/753288#M268405</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-01-22T19:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: Date Comparison - SET ANALYSIS</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Comparison-SET-ANALYSIS/m-p/753289#M268406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apologies for Typo ... I actually meant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current Year:&lt;/P&gt;&lt;P&gt;=count({&amp;lt;MONTH=, Year={"=Date(max(Date),'YYYY')"}&amp;gt;} DealID) -- Works for Current&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Previous Year:&lt;/P&gt;&lt;P&gt;=count({&amp;lt;MONTH=, Year={"=Date(AddYears(max(Date),-1),'YYYY')"}&amp;gt;} DealID) -- Does not work for previous. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get same output for both of these expressions&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2015 20:07:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Comparison-SET-ANALYSIS/m-p/753289#M268406</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-22T20:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Date Comparison - SET ANALYSIS</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Comparison-SET-ANALYSIS/m-p/753290#M268407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you make a selection in the Date field you also need to 'reset' that selection in the set modifier:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({&amp;lt;Date=, MONTH=, Year={"=Date(AddYears(max(Date),-1),'YYYY')"}&amp;gt;} DealID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And of course your Year field should be a date field since you're comparing it in the set modifier with a date, one that's formatted as a year, but still a date. If your Year field contains year values instead of dates then you need to use something like Year={"$(=Year(AddYears(max(Date),-1)))"}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2015 20:14:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Comparison-SET-ANALYSIS/m-p/753290#M268407</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-01-22T20:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: Date Comparison - SET ANALYSIS</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Comparison-SET-ANALYSIS/m-p/753291#M268408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gysbert.....you are fabulous ..... solution worked.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Shree Angane&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2015 20:33:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Comparison-SET-ANALYSIS/m-p/753291#M268408</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-22T20:33:49Z</dc:date>
    </item>
  </channel>
</rss>

