<?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: dates and flooring in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/dates-and-flooring/m-p/941701#M528206</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Neither of those are working for me.&amp;nbsp; The Create Date is a number format with many decimals.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Sep 2015 18:44:30 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-09-25T18:44:30Z</dc:date>
    <item>
      <title>dates and flooring</title>
      <link>https://community.qlik.com/t5/QlikView/dates-and-flooring/m-p/941699#M528204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi community,&lt;/P&gt;&lt;P&gt;I am trying to add up all of the OPEN_QN_FLGs for each year only if the create date has been greater than 60 years.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I set the following variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET v60Days = floor(today(1)) - 60;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My expression is the following:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;YEAR_NO={$(vCurrentYear), CreateDate = {$(v60Days)}&amp;gt;} OPEN_QN_FLG), 0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting the error "No Data to Display" on the chart.&amp;nbsp; I think it is because the CreateDate field is in this number format: xxxxx.xxxxxxx, so is different than the date format. Do I need to floor the create date to make it the same format as the variable?&amp;nbsp; Can someone explain to me how to do so?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 15:17:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dates-and-flooring/m-p/941699#M528204</guid>
      <dc:creator />
      <dc:date>2015-09-25T15:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: dates and flooring</title>
      <link>https://community.qlik.com/t5/QlikView/dates-and-flooring/m-p/941700#M528205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Today() function is already "floored" so you don't need to use the function when you assign the variable. But if the CreateDate has a fractional part, you need to use it there.&lt;/P&gt;&lt;P&gt;So, you do need to do the following:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Make sure that CreateDate and v60Days use the same format.&lt;/LI&gt;&lt;LI&gt;Make &lt;SPAN style="font-size: 13.3333px;"&gt;sure that CreateDate and v60Days both are integers (use Floor()).&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;Use single quotes around the date.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Hence the following will work if CreateDate is an integer &lt;EM style="text-decoration: underline;"&gt;not&lt;/EM&gt; formatted as a date:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; LET v60Days = Num(today(1) - 60);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; sum({&amp;lt;YEAR_NO={$(vCurrentYear), CreateDate = {$(v60Days)}&amp;gt;} OPEN_QN_FLG), 0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;And the following will work if CreateDate &lt;SPAN style="text-decoration: underline;"&gt;&lt;EM&gt;is&lt;/EM&gt;&lt;/SPAN&gt; an integer formatted as a date:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; LET v60Days = Date(today(1) - 60);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; sum({&amp;lt;YEAR_NO={$(vCurrentYear), CreateDate = {'$(v60Days)'}&amp;gt;} OPEN_QN_FLG), 0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; line-height: 1.5em;"&gt;HIC&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 16:23:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dates-and-flooring/m-p/941700#M528205</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2015-09-25T16:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: dates and flooring</title>
      <link>https://community.qlik.com/t5/QlikView/dates-and-flooring/m-p/941701#M528206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Neither of those are working for me.&amp;nbsp; The Create Date is a number format with many decimals.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 18:44:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dates-and-flooring/m-p/941701#M528206</guid>
      <dc:creator />
      <dc:date>2015-09-25T18:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: dates and flooring</title>
      <link>https://community.qlik.com/t5/QlikView/dates-and-flooring/m-p/941702#M528207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what happens if you wrap the createdate filed within the date function&lt;/P&gt;&lt;P&gt;date(CreateDate)&lt;/P&gt;&lt;P&gt;this should convert the CreateDate field into a date format&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 19:44:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dates-and-flooring/m-p/941702#M528207</guid>
      <dc:creator />
      <dc:date>2015-09-25T19:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: dates and flooring</title>
      <link>https://community.qlik.com/t5/QlikView/dates-and-flooring/m-p/941703#M528208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do not want to change it in the script permanently because for some of my other charts I need it to not be in date format.&amp;nbsp; Is there somewhere I can do this to only change this chart?&amp;nbsp; Can I do it in the Expressions box instead of editing the script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 19:47:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dates-and-flooring/m-p/941703#M528208</guid>
      <dc:creator />
      <dc:date>2015-09-25T19:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: dates and flooring</title>
      <link>https://community.qlik.com/t5/QlikView/dates-and-flooring/m-p/941704#M528209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes - you should be able to wrap the create date field in the date funtion within the expression of the chart&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also look at the number tab on the chart and set that field to be a date as well&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 19:50:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dates-and-flooring/m-p/941704#M528209</guid>
      <dc:creator />
      <dc:date>2015-09-25T19:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: dates and flooring</title>
      <link>https://community.qlik.com/t5/QlikView/dates-and-flooring/m-p/941705#M528210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Channing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any luck??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;have a good weekend&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 20:44:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dates-and-flooring/m-p/941705#M528210</guid>
      <dc:creator />
      <dc:date>2015-09-25T20:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: dates and flooring</title>
      <link>https://community.qlik.com/t5/QlikView/dates-and-flooring/m-p/941706#M528211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the CreateDate has decimals, then you need to use floor(). It needs to be an integer. See &lt;A href="https://community.qlik.com/qlik-blogpost/2954"&gt;Why don’t my dates work?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 21:14:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dates-and-flooring/m-p/941706#M528211</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2015-09-25T21:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: dates and flooring</title>
      <link>https://community.qlik.com/t5/QlikView/dates-and-flooring/m-p/941707#M528212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I just don't know the syntax.&amp;nbsp; I am brand new to Qlikview so am still working on it.&amp;nbsp; Thanks for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 21:33:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dates-and-flooring/m-p/941707#M528212</guid>
      <dc:creator />
      <dc:date>2015-09-25T21:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: dates and flooring</title>
      <link>https://community.qlik.com/t5/QlikView/dates-and-flooring/m-p/941708#M528213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13px;"&gt;LET v60Days = Num(today(1) - 60);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; sum({&amp;lt;YEAR_NO={$(vCurrentYear), floor(CreateDate) = {$(v60Days)}&amp;gt;} OPEN_QN_FLG), 0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13px;"&gt;Like that? That won't work it still says No data to display.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 21:43:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dates-and-flooring/m-p/941708#M528213</guid>
      <dc:creator />
      <dc:date>2015-09-25T21:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: dates and flooring</title>
      <link>https://community.qlik.com/t5/QlikView/dates-and-flooring/m-p/941709#M528214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No you can't use any functions to the left of the equals sign in Set Analysis. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The best solution is to do it in the script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Floor(CreateDate)) as CreateDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can't touch the script, you must use relational operators in the Set Analysis, e.g.&lt;/P&gt;&lt;P&gt;&amp;nbsp; sum({&amp;lt;YEAR_NO={$(vCurrentYear), CreateDate = {"&amp;gt;$(v60Days)"}&amp;gt;} OPEN_QN_FLG), 0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&amp;nbsp; sum({&amp;lt;YEAR_NO={$(vCurrentYear), CreateDate = {"&amp;gt;$(v60Days)&amp;lt;$(=&lt;SPAN style="font-size: 13.3333px;"&gt;v60Days+1&lt;/SPAN&gt;)"}&amp;gt;} OPEN_QN_FLG), 0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 21:49:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dates-and-flooring/m-p/941709#M528214</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2015-09-25T21:49:18Z</dc:date>
    </item>
  </channel>
</rss>

