<?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: Days Late not calculating properly in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Days-Late-not-calculating-properly/m-p/760191#M270464</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;you can simply use the function&lt;STRONG&gt; Interval&lt;/STRONG&gt; in order to get the difference (in day, year, ...) between two dates:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;interval(Resolved_Date - Date_Due, 'd') as Days_Late&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where 'd' gives you the output in days.&lt;/P&gt;&lt;P&gt;You can read the Help for your reference about Interval function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KR,&lt;/P&gt;&lt;P&gt;Elena&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 24 Jan 2015 18:13:01 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-01-24T18:13:01Z</dc:date>
    <item>
      <title>Days Late not calculating properly</title>
      <link>https://community.qlik.com/t5/QlikView/Days-Late-not-calculating-properly/m-p/760190#M270463</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 calculate if a Job has been completed on time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Job is completed on time if Resolved Date is less than Due Date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the Resolved Date is the same Due Date it is not late.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the Resolved Date is different to Due Date then it is late.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what my results look like at the moment:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/76120_Capture.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see Days Late is not calculating properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Script for the field looks like:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Resolved_Date - Date_Due as Days_Late&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Timestamp(Date_Created + ApplyMap('SLA_Map',IssueKey)) as Date_Due,&lt;/P&gt;&lt;P&gt;Date(Resolved_Date) as Resolved_Date&lt;/P&gt;&lt;P&gt;From&lt;/P&gt;&lt;P&gt;Table.qvd;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date_Due field uses ApplyMap function to get a number to add to the dates to get due date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know how to get the correct results for Days Late? &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jan 2015 22:33:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Days-Late-not-calculating-properly/m-p/760190#M270463</guid>
      <dc:creator />
      <dc:date>2015-01-23T22:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: Days Late not calculating properly</title>
      <link>https://community.qlik.com/t5/QlikView/Days-Late-not-calculating-properly/m-p/760191#M270464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;you can simply use the function&lt;STRONG&gt; Interval&lt;/STRONG&gt; in order to get the difference (in day, year, ...) between two dates:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;interval(Resolved_Date - Date_Due, 'd') as Days_Late&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where 'd' gives you the output in days.&lt;/P&gt;&lt;P&gt;You can read the Help for your reference about Interval function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KR,&lt;/P&gt;&lt;P&gt;Elena&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Jan 2015 18:13:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Days-Late-not-calculating-properly/m-p/760191#M270464</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-24T18:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: Days Late not calculating properly</title>
      <link>https://community.qlik.com/t5/QlikView/Days-Late-not-calculating-properly/m-p/760192#M270465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;remove the time part of Date_Due with floor&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333339691162px;"&gt;Resolved_Date - floor(Date_Due) as Days_Late&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Jan 2015 18:43:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Days-Late-not-calculating-properly/m-p/760192#M270465</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-01-24T18:43:23Z</dc:date>
    </item>
  </channel>
</rss>

