<?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 IntevalMatch on values that cross midnight in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/IntevalMatch-on-values-that-cross-midnight/m-p/1268758#M620021</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 have a load statement that is doing an interval match by minute of day.&amp;nbsp; It appears to be working only for cases that occur on the same date. Here is an example of an instance where a case crosses midnight and not getting any values for intervalmatch:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASES:&lt;/P&gt;&lt;P&gt;LOAD * INLINE&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;LOG,SurgDt,InTime,OutTime&lt;/P&gt;&lt;P&gt;240819,03/06/17,18:40:00,00:21:00&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MINODAY:&lt;/P&gt;&lt;P&gt;Load interval(frac(recno()/1440),'h:mm') as MinOfDay autogenerate(1440);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOGTIME:&lt;/P&gt;&lt;P&gt;LOAD DISTINCT LOG,&lt;/P&gt;&lt;P&gt;&amp;nbsp; InTime,&lt;/P&gt;&lt;P&gt;&amp;nbsp; OutTime,&lt;/P&gt;&lt;P&gt;&amp;nbsp; interval(InTime+(IterNo()-1)/1440, 'h:mm') as MinOfDay&amp;nbsp; &lt;/P&gt;&lt;P&gt;RESIDENT CASES&lt;/P&gt;&lt;P&gt;While InTime+(IterNo()-1)/1440&amp;lt;=OutTime; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;MINS:&lt;/P&gt;&lt;P&gt;Load MinOfDay,LOG Resident LOGTIME;&lt;/P&gt;&lt;P&gt;INNER JOIN (MINS)&lt;/P&gt;&lt;P&gt;IntervalMatch(MinOfDay,LOG)&lt;/P&gt;&lt;P&gt;LOAD InTime, OutTime&lt;/P&gt;&lt;P&gt;Resident LOGTIME;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE LOGTIME;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions would be greatly appreciated.&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, 10 Mar 2017 15:50:44 GMT</pubDate>
    <dc:creator>andrewmo</dc:creator>
    <dc:date>2017-03-10T15:50:44Z</dc:date>
    <item>
      <title>IntevalMatch on values that cross midnight</title>
      <link>https://community.qlik.com/t5/QlikView/IntevalMatch-on-values-that-cross-midnight/m-p/1268758#M620021</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 have a load statement that is doing an interval match by minute of day.&amp;nbsp; It appears to be working only for cases that occur on the same date. Here is an example of an instance where a case crosses midnight and not getting any values for intervalmatch:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASES:&lt;/P&gt;&lt;P&gt;LOAD * INLINE&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;LOG,SurgDt,InTime,OutTime&lt;/P&gt;&lt;P&gt;240819,03/06/17,18:40:00,00:21:00&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MINODAY:&lt;/P&gt;&lt;P&gt;Load interval(frac(recno()/1440),'h:mm') as MinOfDay autogenerate(1440);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOGTIME:&lt;/P&gt;&lt;P&gt;LOAD DISTINCT LOG,&lt;/P&gt;&lt;P&gt;&amp;nbsp; InTime,&lt;/P&gt;&lt;P&gt;&amp;nbsp; OutTime,&lt;/P&gt;&lt;P&gt;&amp;nbsp; interval(InTime+(IterNo()-1)/1440, 'h:mm') as MinOfDay&amp;nbsp; &lt;/P&gt;&lt;P&gt;RESIDENT CASES&lt;/P&gt;&lt;P&gt;While InTime+(IterNo()-1)/1440&amp;lt;=OutTime; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;MINS:&lt;/P&gt;&lt;P&gt;Load MinOfDay,LOG Resident LOGTIME;&lt;/P&gt;&lt;P&gt;INNER JOIN (MINS)&lt;/P&gt;&lt;P&gt;IntervalMatch(MinOfDay,LOG)&lt;/P&gt;&lt;P&gt;LOAD InTime, OutTime&lt;/P&gt;&lt;P&gt;Resident LOGTIME;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE LOGTIME;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions would be greatly appreciated.&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, 10 Mar 2017 15:50:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IntevalMatch-on-values-that-cross-midnight/m-p/1268758#M620021</guid>
      <dc:creator>andrewmo</dc:creator>
      <dc:date>2017-03-10T15:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: IntevalMatch on values that cross midnight</title>
      <link>https://community.qlik.com/t5/QlikView/IntevalMatch-on-values-that-cross-midnight/m-p/1268759#M620022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think if there is a day-shift included you will need to match your data on a timestamp and not only on time and you might need to adjust your source with something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASES:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOG,SurgDt,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(SurgDt+InTime) as InTime,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(SurgDt+OutTime+if(OutTime&amp;lt;InTime,1,0)) as OutTime&lt;/P&gt;&lt;P&gt;INLINE [&lt;/P&gt;&lt;P&gt;LOG,SurgDt,InTime,OutTime&lt;/P&gt;&lt;P&gt;240819,03/06/17,18:40:00,00:21:00];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Mar 2017 18:07:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IntevalMatch-on-values-that-cross-midnight/m-p/1268759#M620022</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-03-10T18:07:40Z</dc:date>
    </item>
  </channel>
</rss>

