<?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: INTERVALMATCH works with only some timestamps in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/INTERVALMATCH-works-with-only-some-timestamps/m-p/1703821#M592268</link>
    <description>&lt;P&gt;I think this has to with &lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/Rounding-Errors/ba-p/1468808" target="_blank" rel="noopener"&gt;Rounding Errors&lt;/A&gt;&amp;nbsp;and another one&amp;nbsp;&lt;A href="https://support.qlik.com/articles/000005572" target="_blank" rel="noopener"&gt;Rounded numerical values sometimes get unexpected results&lt;/A&gt;. This happens because time is decimal number (1 day or 24 hour = 1 and 12 hours = 0.50). So, one way to may be address this to slighly decrease your start time (by 0.000000001) and slighly increase your end time (by&amp;nbsp;0.000000001) for your range and see if that resolve your issue.&lt;/P&gt;</description>
    <pubDate>Wed, 20 May 2020 12:28:58 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2020-05-20T12:28:58Z</dc:date>
    <item>
      <title>INTERVALMATCH works with only some timestamps</title>
      <link>https://community.qlik.com/t5/QlikView/INTERVALMATCH-works-with-only-some-timestamps/m-p/1703813#M592267</link>
      <description>&lt;P&gt;Dear Qlik specialists and enthusiasts,&lt;/P&gt;&lt;P&gt;I am having some trouble with INTERVAL MATCH function on Qlikview which I am not able to solve for more than a day already. I am wondering whether any of you have ideas how to solve it or why this problem occurs. I have a table with some times which looks like that:&lt;/P&gt;&lt;TABLE border="1" width="38.19047619047619%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;Date&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;start time&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;end time&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;1/2/2020 12:00:00 AM&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;10:00&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;10:30&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;1/2/2020 12:00:00 AM&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;10:30&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;10:45&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;1/2/2020 12:00:00 AM&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;10:45&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;11:00&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;It also has some other fields, but they are currently not relevant&lt;/P&gt;&lt;P&gt;I am trying to match it with the second table with time periods which looks the same (date, start time, end time and some other fields.)&lt;/P&gt;&lt;P&gt;In sql my script looked like that:&amp;nbsp;&lt;/P&gt;&lt;P&gt;select * from Table 1 as a&lt;/P&gt;&lt;P&gt;left outer join Table 2 as b on&amp;nbsp;&lt;/P&gt;&lt;P&gt;a.datum = b.datum and a.[start time] between b.[start time] and b.[end time]&lt;/P&gt;&lt;P&gt;I am trying to achieve the same results with Intervalmatch in Qlikview&lt;/P&gt;&lt;P&gt;Table 2:&lt;BR /&gt;LOAD&lt;BR /&gt;*&lt;BR /&gt;FROM [..\QV_Datamarts\Table2.qvd]&lt;BR /&gt;(qvd)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Table 1:&lt;BR /&gt;LOAD *&lt;/P&gt;&lt;P&gt;FROM [..\QV_Datamarts\Table1.qvd]&lt;BR /&gt;(qvd)&lt;BR /&gt;&lt;BR /&gt;LEFT JOIN (Table 1)&lt;BR /&gt;INTERVALMATCH ([start time], [Date])&lt;BR /&gt;LOAD&lt;BR /&gt;[start time]&lt;BR /&gt;,[end time]&lt;BR /&gt;,[Date]&lt;BR /&gt;RESIDENT [Table 2]&lt;BR /&gt;;&lt;BR /&gt;LEFT JOIN ([Table 1])&lt;BR /&gt;LOAD *&lt;BR /&gt;RESIDENT [Table 2]&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;The problem is that the match sometimes does not work. For example I have start time 13:50:00 in the first table and it does not match with 13:50:00 - 13:59:00 in the second table, while it does work for some other times. Funny enough when I apply time# ([start time], 'hh:mm:ss') on the start time in the first table it finds more matches, but still not all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does any of you have some ideas why this can be the case? I tried to reformat the times in a similar way in both tables, but it still does not work. I am going crazy...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 00:38:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/INTERVALMATCH-works-with-only-some-timestamps/m-p/1703813#M592267</guid>
      <dc:creator>Polina</dc:creator>
      <dc:date>2024-11-16T00:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: INTERVALMATCH works with only some timestamps</title>
      <link>https://community.qlik.com/t5/QlikView/INTERVALMATCH-works-with-only-some-timestamps/m-p/1703821#M592268</link>
      <description>&lt;P&gt;I think this has to with &lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/Rounding-Errors/ba-p/1468808" target="_blank" rel="noopener"&gt;Rounding Errors&lt;/A&gt;&amp;nbsp;and another one&amp;nbsp;&lt;A href="https://support.qlik.com/articles/000005572" target="_blank" rel="noopener"&gt;Rounded numerical values sometimes get unexpected results&lt;/A&gt;. This happens because time is decimal number (1 day or 24 hour = 1 and 12 hours = 0.50). So, one way to may be address this to slighly decrease your start time (by 0.000000001) and slighly increase your end time (by&amp;nbsp;0.000000001) for your range and see if that resolve your issue.&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2020 12:28:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/INTERVALMATCH-works-with-only-some-timestamps/m-p/1703821#M592268</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-05-20T12:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: INTERVALMATCH works with only some timestamps</title>
      <link>https://community.qlik.com/t5/QlikView/INTERVALMATCH-works-with-only-some-timestamps/m-p/1703912#M592269</link>
      <description>&lt;P&gt;It looks like you are right. What seemed to help (I am a bit afraid to say that it works in all cases) is to do first&amp;nbsp; Time and then&amp;nbsp; #Time conversion like that&amp;nbsp;Time#(time([start time], 'hh:mm:ss'),'hh:mm:ss'). Some useful information for why comparison between time stamps works/doesn't work is provided here:&amp;nbsp;&lt;A href="https://qlikviewcookbook.com/2011/10/correct-time-arithmetic/" target="_blank"&gt;https://qlikviewcookbook.com/2011/10/correct-time-arithmetic/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I will leave this topic open for now just in case (still not sure whether my script runs as planned).&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2020 15:54:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/INTERVALMATCH-works-with-only-some-timestamps/m-p/1703912#M592269</guid>
      <dc:creator>Polina</dc:creator>
      <dc:date>2020-05-20T15:54:22Z</dc:date>
    </item>
  </channel>
</rss>

