<?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 Date in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-in-set-analysis/m-p/261437#M1194045</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone Special,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two date related question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A. I have to compare a Modified Date with less than or equal to Today's date.&lt;/P&gt;&lt;P&gt;In if...else statement it works fine for me if I write Modified_Date&amp;lt;=Today()&lt;/P&gt;&lt;P&gt;But it doesn't seem to work in set analysis if I write Modified_Date = {"&amp;lt;=$(=Today())"} or Modified_Date={"&amp;lt;=Today()"} .Neither of them works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B. In the second case Modified date is actually in Julian date. So in order to compare with Today's date I need it to be back in normal calendar format.&lt;/P&gt;&lt;P&gt;Hence in if...else statement it works fine if I write&lt;EM&gt; Date&lt;/EM&gt;(Modified_Date)&amp;lt;=Today(), but no luck when I use set analysis as Date(Modified_Date)={"&amp;lt;=Today()"}.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any suggestion,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bikash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Jun 2011 18:06:15 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-06-02T18:06:15Z</dc:date>
    <item>
      <title>Date in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-in-set-analysis/m-p/261437#M1194045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone Special,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two date related question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A. I have to compare a Modified Date with less than or equal to Today's date.&lt;/P&gt;&lt;P&gt;In if...else statement it works fine for me if I write Modified_Date&amp;lt;=Today()&lt;/P&gt;&lt;P&gt;But it doesn't seem to work in set analysis if I write Modified_Date = {"&amp;lt;=$(=Today())"} or Modified_Date={"&amp;lt;=Today()"} .Neither of them works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B. In the second case Modified date is actually in Julian date. So in order to compare with Today's date I need it to be back in normal calendar format.&lt;/P&gt;&lt;P&gt;Hence in if...else statement it works fine if I write&lt;EM&gt; Date&lt;/EM&gt;(Modified_Date)&amp;lt;=Today(), but no luck when I use set analysis as Date(Modified_Date)={"&amp;lt;=Today()"}.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any suggestion,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bikash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2011 18:06:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-in-set-analysis/m-p/261437#M1194045</guid>
      <dc:creator />
      <dc:date>2011-06-02T18:06:15Z</dc:date>
    </item>
    <item>
      <title>Date in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-in-set-analysis/m-p/261438#M1194046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, for both cases, I prefer to use dates as integers since set analysis can get lost with different format. &lt;/P&gt;&lt;P&gt;On the script level I would create an additional field as an pure integer as:&lt;/P&gt;&lt;P&gt;load (... your regular code) , &lt;/P&gt;&lt;P&gt;num(Modified_Date) as nModified_Date&lt;/P&gt;&lt;P&gt;from / Resident (... your regular code) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On set analysis, your expressions will look like this: &lt;/P&gt;&lt;P&gt;sum (&amp;nbsp; { &amp;lt; nModified_Date = {'&amp;lt;=num(today())'} &amp;gt;} Value) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this 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, 02 Jun 2011 22:01:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-in-set-analysis/m-p/261438#M1194046</guid>
      <dc:creator>erichshiino</dc:creator>
      <dc:date>2011-06-02T22:01:51Z</dc:date>
    </item>
    <item>
      <title>Date in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-in-set-analysis/m-p/261439#M1194047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The basic thing is to make sure your field and the values of the set are in the exact same format.&amp;nbsp; Set analysis basically does a text comparison.&amp;nbsp; One way to be sure you have the exact same format is to convert them both to numbers as Erich says.&amp;nbsp; Another is to use the date() function inside of the set analysis to format the date exactly as your date field is formatted.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2011 23:21:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-in-set-analysis/m-p/261439#M1194047</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-06-02T23:21:47Z</dc:date>
    </item>
    <item>
      <title>Date in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-in-set-analysis/m-p/261440#M1194048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Erich for the solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2011 00:17:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-in-set-analysis/m-p/261440#M1194048</guid>
      <dc:creator />
      <dc:date>2011-06-03T00:17:04Z</dc:date>
    </item>
    <item>
      <title>Date in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-in-set-analysis/m-p/261441#M1194049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John, thanks a lot for teaching the basic concept behind the solution. Loved it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2011 00:17:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-in-set-analysis/m-p/261441#M1194049</guid>
      <dc:creator />
      <dc:date>2011-06-03T00:17:39Z</dc:date>
    </item>
    <item>
      <title>Date in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-in-set-analysis/m-p/261442#M1194050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, for both cases, I prefer to use dates as integers since set analysis can get lost with different format.&lt;/P&gt;&lt;P&gt;On the script level I would create an additional field as an pure integer as:&lt;/P&gt;&lt;P&gt;load (... your regular code) ,&lt;/P&gt;&lt;P&gt;num(Modified_Date) as nModified_Date&lt;/P&gt;&lt;P&gt;from / Resident (... your regular code)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On set analysis, your expressions will look like this:&lt;/P&gt;&lt;P&gt;sum (&amp;nbsp; { &amp;lt; nModified_Date = {'&amp;lt;=num(today())'} &amp;gt;} Value)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2011 04:51:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-in-set-analysis/m-p/261442#M1194050</guid>
      <dc:creator />
      <dc:date>2011-06-03T04:51:16Z</dc:date>
    </item>
  </channel>
</rss>

