<?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 How to find month difference for two dates using Set Analysis ? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-find-month-difference-for-two-dates-using-Set-Analysis/m-p/514058#M192056</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two dates and want the Registration number for those units which have month difference of more than 36 months using Set Analysis in expression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Sep 2013 12:20:32 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-09-12T12:20:32Z</dc:date>
    <item>
      <title>How to find month difference for two dates using Set Analysis ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-month-difference-for-two-dates-using-Set-Analysis/m-p/514058#M192056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two dates and want the Registration number for those units which have month difference of more than 36 months using Set Analysis in expression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Sep 2013 12:20:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-month-difference-for-two-dates-using-Set-Analysis/m-p/514058#M192056</guid>
      <dc:creator />
      <dc:date>2013-09-12T12:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to find month difference for two dates using Set Analysis ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-month-difference-for-two-dates-using-Set-Analysis/m-p/514059#M192057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joydeep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the two dates you need to compare are on the same row of data your best bet is to add a calculated field at load time, this can then be used in your expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression in the load will be something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if([Last Date] - [First Date] &amp;gt; 1095, 'Yes', 'No') as [Over 36 Months],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are two advantages to the approach of working this out at load time.&amp;nbsp; First the field can then be used as a selection and a dimension.&amp;nbsp; Secondly there is a much smaller performance hit at display time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the two dates are not on the same row of data then you are probably needing to get into nested aggregations - which is a bit more involved.&amp;nbsp; Post back if that is the case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.quickintelligence.co.uk/"&gt;http://www.quickintelligence.co.uk/&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Sep 2013 12:45:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-month-difference-for-two-dates-using-Set-Analysis/m-p/514059#M192057</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2013-09-12T12:45:41Z</dc:date>
    </item>
  </channel>
</rss>

