<?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 Compare dates in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Compare-dates-in-set-analysis/m-p/216768#M70056</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have some problems with dates in set analysis as well but it always works when I use numbers instead of dates.&lt;/P&gt;&lt;P&gt;[Date Last Cert Create] is a date, right? (like 31/12/2010). It`s easier if you create a field on the data model as a number.&lt;/P&gt;&lt;P&gt;For example&lt;/P&gt;&lt;P&gt;Load ...&lt;/P&gt;&lt;P&gt;num([Date Last Cert Create]) as nDateLastCertCreate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After that, I would do the same with the today()-15&lt;/P&gt;&lt;P&gt;The result would look like this&lt;/P&gt;&lt;P&gt;=count({&amp;lt;[nDateLastCertCreate]={"&amp;gt;=$(=num(Today()-15))"}&amp;gt;} distinct Vendor_ID)&lt;/P&gt;&lt;P&gt;Hope it helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Apr 2011 19:30:24 GMT</pubDate>
    <dc:creator>erichshiino</dc:creator>
    <dc:date>2011-04-14T19:30:24Z</dc:date>
    <item>
      <title>Compare dates in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-dates-in-set-analysis/m-p/216767#M70055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;Thanks for all your help.&lt;/P&gt;&lt;P&gt;i have a date field and want to compare it against the date 15 days from today.i tried something like this.&lt;/P&gt;&lt;P&gt;=count({&amp;lt;[Date Last Cert Create]={"&amp;gt;=$(=Today()-15)"}&amp;gt;} distinct Vendor_ID)&lt;/P&gt;&lt;P&gt;and it gives no results.&lt;/P&gt;&lt;P&gt;and my date field has only days ie 1,2,3,...&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2011 19:05:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-dates-in-set-analysis/m-p/216767#M70055</guid>
      <dc:creator />
      <dc:date>2011-04-14T19:05:54Z</dc:date>
    </item>
    <item>
      <title>Compare dates in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-dates-in-set-analysis/m-p/216768#M70056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have some problems with dates in set analysis as well but it always works when I use numbers instead of dates.&lt;/P&gt;&lt;P&gt;[Date Last Cert Create] is a date, right? (like 31/12/2010). It`s easier if you create a field on the data model as a number.&lt;/P&gt;&lt;P&gt;For example&lt;/P&gt;&lt;P&gt;Load ...&lt;/P&gt;&lt;P&gt;num([Date Last Cert Create]) as nDateLastCertCreate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After that, I would do the same with the today()-15&lt;/P&gt;&lt;P&gt;The result would look like this&lt;/P&gt;&lt;P&gt;=count({&amp;lt;[nDateLastCertCreate]={"&amp;gt;=$(=num(Today()-15))"}&amp;gt;} distinct Vendor_ID)&lt;/P&gt;&lt;P&gt;Hope it helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2011 19:30:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-dates-in-set-analysis/m-p/216768#M70056</guid>
      <dc:creator>erichshiino</dc:creator>
      <dc:date>2011-04-14T19:30:24Z</dc:date>
    </item>
    <item>
      <title>Compare dates in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-dates-in-set-analysis/m-p/216769#M70057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or go the other direction and convert the number to a date. Either way, the point is that set analysis isn't smart enough to recognize that dates and numbers can be treated as the same sort of thing. Technically, it's doing a text comparison of the formatted values, I believe. So just format it properly. Assuming your default date format is correct, the below. If you have a different date format, specify it explicitly in the date() function.&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;count({&amp;lt;[Date Last Cert Create]={"&amp;gt;=$(=date(Today()-15))"}&amp;gt;} distinct Vendor_ID)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2011 00:51:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-dates-in-set-analysis/m-p/216769#M70057</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-04-15T00:51:19Z</dc:date>
    </item>
  </channel>
</rss>

