<?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: Count(Interval) not working in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Count-Interval-not-working/m-p/770728#M10844</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fantastic,&amp;nbsp; thanks for getting me the right answer so quickly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Nov 2014 15:23:43 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-11-18T15:23:43Z</dc:date>
    <item>
      <title>Count(Interval) not working</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Interval-not-working/m-p/770726#M10842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data&lt;/P&gt;&lt;P&gt;2014-11-17 09:00:00,2014-11-17 08:00:00&lt;/P&gt;&lt;P&gt;2014-11-17 09:00:00,2014-11-17 07:00:00&lt;/P&gt;&lt;P&gt;2014-11-17 09:00:00,2014-11-16 08:00:00&lt;/P&gt;&lt;P&gt;2014-11-17 09:00:00,2014-11-15 07:00:00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load Script&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Interval(@1-@2 ,'DD') as "closing_interval_days"&lt;/P&gt;&lt;P&gt;FROM [lib://Documents/temp_qlik_data.txt]&lt;/P&gt;&lt;P&gt;(txt, codepage is 1252, no labels, delimiter is ',', msq);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I add a 'table' to the sheet,&amp;nbsp; it correctly gives me the following values for the intervals&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if I add a pie chart with a count of the intervals I get&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0&amp;nbsp; count 1&lt;/P&gt;&lt;P&gt;0 count&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;1&amp;nbsp; count 1&lt;/P&gt;&lt;P&gt;2&amp;nbsp; count 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would have hoped for&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0 count2&lt;/P&gt;&lt;P&gt;1 count1&lt;/P&gt;&lt;P&gt;2 count1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this correct?&amp;nbsp;&amp;nbsp; Have I misunderstood interval?&amp;nbsp; Are the underlying minutes/seconds still there in the background?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Nov 2014 13:49:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Interval-not-working/m-p/770726#M10842</guid>
      <dc:creator />
      <dc:date>2014-11-18T13:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: Count(Interval) not working</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Interval-not-working/m-p/770727#M10843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are close. The issue is this&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;"&gt; Interval(@1-@2 ,'DD') as "closing_interval_days"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&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;"&gt;The interval will store all the details (days, hours, minutes, seconds etc..) between the 2 timestamps but the interval() function with 'DD' is just a formatting measure.&amp;nbsp; So the pie chart believes they are different even if that is not obvious. When you format the day dimension to show more details as below, its apparent&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;IMG alt="Capture.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/71518_Capture.PNG.png" style="width: 620px; height: 297px;" /&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;"&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;"&gt;To resolve this replace it with this which will round it to whole integer days and it should work the way you want. &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;"&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;"&gt;floor( Interval(@1-@2 ,'DD')) as "closing_interval_days"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&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;"&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;"&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;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Nov 2014 14:50:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Interval-not-working/m-p/770727#M10843</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-11-18T14:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: Count(Interval) not working</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Interval-not-working/m-p/770728#M10844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fantastic,&amp;nbsp; thanks for getting me the right answer so quickly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Nov 2014 15:23:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Interval-not-working/m-p/770728#M10844</guid>
      <dc:creator />
      <dc:date>2014-11-18T15:23:43Z</dc:date>
    </item>
  </channel>
</rss>

