<?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 functions in set analysis in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Date-functions-in-set-analysis/m-p/1027201#M15625</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;[Snapshot Date] is a number when I output it in a kpi with auto format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max({&amp;lt;[Snapshot Date] = {"$(=Num(MonthEnd(YearStart(max([Snapshot Date])))))"}&amp;gt;}[Snapshot Date]) -&amp;gt; Doesn't work&lt;/P&gt;&lt;P&gt;Max({&amp;lt;[Snapshot Date] = {"$(=Num(MonthEnd(max([Snapshot Date]))))"}&amp;gt;}[Snapshot Date]) -&amp;gt; Doesn't work&lt;/P&gt;&lt;P&gt;Max({&amp;lt;[Snapshot Date] = {"$(=Num(max([Snapshot Date])))"}&amp;gt;}[Snapshot Date]) -&amp;gt; works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MonthEnd should work just fine as all dates are end of month. Max(date) = '2013-12-31' and '2013-01-31' is there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a mather of fact:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Max({&amp;lt;[Snapshot Date] = {"$(=Num(min([Snapshot Date])))"}&amp;gt;}[Snapshot Date])&amp;nbsp;&amp;nbsp; returns 41305 (&lt;SPAN style="font-size: 13.3333px;"&gt;2013-01-31)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Apr 2016 17:47:08 GMT</pubDate>
    <dc:creator>maxim1500</dc:creator>
    <dc:date>2016-04-13T17:47:08Z</dc:date>
    <item>
      <title>Date functions in set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Date-functions-in-set-analysis/m-p/1027199#M15623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to filter out a dataset to keep only the last day of the current year (based on my max snapshot date selection).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am expecting something like this to work, based on what I saw on this forum:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Snapshot Date] = {"$(=MonthEnd(YearStart(max([Snapshot Date]))))"}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I do &lt;STRONG style="font-size: 13.3333px;"&gt;=&lt;/STRONG&gt;MonthEnd(YearStart(max([Snapshot Date]))) in a KPI, I get the right date. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, If I execute this function, it works:&lt;/P&gt;&lt;P&gt;Max({&amp;lt;[Snapshot Date] = {"$(=min([Snapshot Date]))"}&amp;gt;}[Snapshot Date])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But as soon as I add another function (like MonthEnd, AddMonths, ...), I only get "-" as a result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2016 17:24:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-functions-in-set-analysis/m-p/1027199#M15623</guid>
      <dc:creator>maxim1500</dc:creator>
      <dc:date>2016-04-13T17:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: Date functions in set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Date-functions-in-set-analysis/m-p/1027200#M15624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is your Snapshot Date formatted as a number? If it is, try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[Snapshot Date] = {"$(=Num(MonthEnd(YearStart(max([Snapshot Date])))))"}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or if it is date, then this may be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[Snapshot Date] = {"$(=Date(MonthEnd(YearStart(max([Snapshot Date]))), 'DateFieldFormatHere'))"}&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2016 17:38:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-functions-in-set-analysis/m-p/1027200#M15624</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-13T17:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: Date functions in set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Date-functions-in-set-analysis/m-p/1027201#M15625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;[Snapshot Date] is a number when I output it in a kpi with auto format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max({&amp;lt;[Snapshot Date] = {"$(=Num(MonthEnd(YearStart(max([Snapshot Date])))))"}&amp;gt;}[Snapshot Date]) -&amp;gt; Doesn't work&lt;/P&gt;&lt;P&gt;Max({&amp;lt;[Snapshot Date] = {"$(=Num(MonthEnd(max([Snapshot Date]))))"}&amp;gt;}[Snapshot Date]) -&amp;gt; Doesn't work&lt;/P&gt;&lt;P&gt;Max({&amp;lt;[Snapshot Date] = {"$(=Num(max([Snapshot Date])))"}&amp;gt;}[Snapshot Date]) -&amp;gt; works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MonthEnd should work just fine as all dates are end of month. Max(date) = '2013-12-31' and '2013-01-31' is there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a mather of fact:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Max({&amp;lt;[Snapshot Date] = {"$(=Num(min([Snapshot Date])))"}&amp;gt;}[Snapshot Date])&amp;nbsp;&amp;nbsp; returns 41305 (&lt;SPAN style="font-size: 13.3333px;"&gt;2013-01-31)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2016 17:47:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-functions-in-set-analysis/m-p/1027201#M15625</guid>
      <dc:creator>maxim1500</dc:creator>
      <dc:date>2016-04-13T17:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: Date functions in set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Date-functions-in-set-analysis/m-p/1027202#M15626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see what the issue is, try this now:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;[Snapshot Date] = {"$(=Num(&lt;SPAN style="color: #ff0000;"&gt;Floor(&lt;/SPAN&gt;MonthEnd(YearStart(max([Snapshot Date])))&lt;SPAN style="color: #ff0000;"&gt;)&lt;/SPAN&gt;))"}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;MonthEnd&lt;/STRONG&gt; gives a timestamp such as 01/31/2016 11:59:59 PM which won't match you date. By adding a Floor you will get ride of the time portion &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2016 17:56:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-functions-in-set-analysis/m-p/1027202#M15626</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-13T17:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: Date functions in set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Date-functions-in-set-analysis/m-p/1027203#M15627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would never have found that one alone! Thx!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2016 17:58:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-functions-in-set-analysis/m-p/1027203#M15627</guid>
      <dc:creator>maxim1500</dc:creator>
      <dc:date>2016-04-13T17:58:43Z</dc:date>
    </item>
  </channel>
</rss>

