<?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 Class function with time interval in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Class-function-with-time-interval/m-p/214816#M68320</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I am pretty new with qlikview and I need your help on solving my problem.&lt;/P&gt;&lt;P&gt;My data contains two separate time (Status_U and Status_F) where status U is when the vehicle got their assignment and status F is when the vehicle has arrived to their assignment and one column of area.&lt;/P&gt;&lt;P&gt;I want to create class interval of waiting time (Status_F - Status_U) with interval of &amp;lt;10 minutes, &amp;lt;20 minutes, 10-15 minutes, 15-30 minutes, 30-45 minutes, 45-60 minutes and &amp;gt;60 minutes. I tried to use class function but it didn't work and I am really confuse.&lt;/P&gt;&lt;P&gt;Another problem is that I am using binary code to read from another qlikview file. Therefore I can't change anything from the database (excel file).&lt;/P&gt;&lt;P&gt;Any suggestions and help are well appreciated.&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;&lt;P&gt;Arini&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Oct 2009 16:08:31 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-10-13T16:08:31Z</dc:date>
    <item>
      <title>Class function with time interval</title>
      <link>https://community.qlik.com/t5/QlikView/Class-function-with-time-interval/m-p/214816#M68320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I am pretty new with qlikview and I need your help on solving my problem.&lt;/P&gt;&lt;P&gt;My data contains two separate time (Status_U and Status_F) where status U is when the vehicle got their assignment and status F is when the vehicle has arrived to their assignment and one column of area.&lt;/P&gt;&lt;P&gt;I want to create class interval of waiting time (Status_F - Status_U) with interval of &amp;lt;10 minutes, &amp;lt;20 minutes, 10-15 minutes, 15-30 minutes, 30-45 minutes, 45-60 minutes and &amp;gt;60 minutes. I tried to use class function but it didn't work and I am really confuse.&lt;/P&gt;&lt;P&gt;Another problem is that I am using binary code to read from another qlikview file. Therefore I can't change anything from the database (excel file).&lt;/P&gt;&lt;P&gt;Any suggestions and help are well appreciated.&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;&lt;P&gt;Arini&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2009 16:08:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Class-function-with-time-interval/m-p/214816#M68320</guid>
      <dc:creator />
      <dc:date>2009-10-13T16:08:31Z</dc:date>
    </item>
    <item>
      <title>Class function with time interval</title>
      <link>https://community.qlik.com/t5/QlikView/Class-function-with-time-interval/m-p/214817#M68321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arini,&lt;/P&gt;&lt;P&gt;what you need is "IntervalMatch".&lt;/P&gt;&lt;P&gt;See the attached example.&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;P&gt;Rainer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Oct 2009 16:50:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Class-function-with-time-interval/m-p/214817#M68321</guid>
      <dc:creator />
      <dc:date>2009-10-14T16:50:19Z</dc:date>
    </item>
    <item>
      <title>Class function with time interval</title>
      <link>https://community.qlik.com/t5/QlikView/Class-function-with-time-interval/m-p/214818#M68322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Rainer,&lt;/P&gt;&lt;P&gt;Thank you for your suggestion. I tried using the interval match as you suggested but it's a little bit different from what i want.&lt;/P&gt;&lt;P&gt;The problem is that my data contains timestamp with hh:mm:ss and I want to classify it with different class interval ex: 5 minutes then 15 minutes.&lt;/P&gt;&lt;P&gt;I tried to use&lt;/P&gt;&lt;P&gt;=dual(time(floor(VänteTid, 1/96),'hh:mm:ss') &amp;amp; ' - ' &amp;amp;&lt;/P&gt;&lt;P&gt;time(ceil (VänteTid, 1/96),'hh:mm:ss')&lt;BR /&gt;&lt;BR /&gt; ,floor(frac(VänteTid),1/96))&lt;/P&gt;&lt;P&gt;From one of the forum solution but it doesnt really get what i want. This is only for class interval 15 minutes.&lt;/P&gt;&lt;P&gt;And i tried to write&lt;/P&gt;&lt;P&gt;Load&lt;BR /&gt; If(VänteTid &amp;lt;= 00:10:00, 'Under 10 min'&lt;BR /&gt; If(VänteTid &amp;gt;=00:10:00 and VänteTid &amp;lt;= 00:15:00, '10-15 Min',&lt;BR /&gt; If(VänteTid &amp;gt; 00:15:00 and VänteTid &amp;lt;= 00:30:00, '15-30 Min',&lt;BR /&gt; If(VänteTid &amp;gt; 00:30:00 and VänteTid &amp;lt;= 00:45:00, '30-45 Min',&lt;BR /&gt; If(VänteTid &amp;gt; 00:45:00 and VänteTid &amp;lt;= 00:60:00, '45-60 Min'',&lt;BR /&gt; If(VänteTid &amp;gt; 00:60:00, 'Över 60 Min')))) as TidInterval&lt;BR /&gt;Resident *;&lt;/P&gt;&lt;P&gt;in the script but i didnt work beacuse it didnt recognise the timestamp. So I'm really confuse.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2009 15:29:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Class-function-with-time-interval/m-p/214818#M68322</guid>
      <dc:creator />
      <dc:date>2009-10-28T15:29:17Z</dc:date>
    </item>
    <item>
      <title>Class function with time interval</title>
      <link>https://community.qlik.com/t5/QlikView/Class-function-with-time-interval/m-p/214819#M68323</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 try something like the below script...&lt;/P&gt;&lt;P&gt;LOAD Vehicle,&lt;BR /&gt; time(Status_U) as Status_U,&lt;BR /&gt; time(Status_F) as Status_F,&lt;BR /&gt; hour(time(Status_F)-time(Status_U))*60+&lt;BR /&gt; minute(time(Status_F)-time(Status_U)) as TimeDiff_minute&lt;BR /&gt;FROM&lt;BR /&gt;hour.xls&lt;BR /&gt;(biff, embedded labels, table is Sheet1$);&lt;/P&gt;&lt;P&gt;TimeRange:&lt;BR /&gt;Load * inline&lt;BR /&gt;[&lt;BR /&gt;start,end,Minute_Range&lt;BR /&gt;0,10,Under 10 min&lt;BR /&gt;10.01,15,10-15 Min&lt;BR /&gt;15.01,30,15-30 Min&lt;BR /&gt;30.01,45,30-45 Min&lt;BR /&gt;45.01,60,45-60 Min&lt;BR /&gt;60.01,999,Over 60 Min&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;intervalmatch(TimeDiff_minute)&lt;BR /&gt;Load&lt;BR /&gt; start,end&lt;BR /&gt;resident TimeRange;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Silvia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2009 16:17:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Class-function-with-time-interval/m-p/214819#M68323</guid>
      <dc:creator />
      <dc:date>2009-10-28T16:17:18Z</dc:date>
    </item>
    <item>
      <title>Class function with time interval</title>
      <link>https://community.qlik.com/t5/QlikView/Class-function-with-time-interval/m-p/214820#M68324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for your help but unfortunately it still didnt work. I attached a little example of my qlikview.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2009 20:34:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Class-function-with-time-interval/m-p/214820#M68324</guid>
      <dc:creator />
      <dc:date>2009-10-28T20:34:16Z</dc:date>
    </item>
    <item>
      <title>Class function with time interval</title>
      <link>https://community.qlik.com/t5/QlikView/Class-function-with-time-interval/m-p/214821#M68325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Untested, but just use this as an additional field in the same load where you load VänteTid:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;If(VänteTid &amp;lt; time#(10,'mm'), dual('Under 10 min', 1),&lt;BR /&gt;If(VänteTid &amp;lt;= time#(15,'mm'), dual('10-15 Min' ,10),&lt;BR /&gt;If(VänteTid &amp;lt;= time#(30,'mm'), dual('15-30 Min' ,15),&lt;BR /&gt;If(VänteTid &amp;lt;= time#(45,'mm'), dual('30-45 Min' ,30),&lt;BR /&gt;If(VänteTid &amp;lt;= time#(60,'mm'), dual('45-60 Min'' ,45),&lt;BR /&gt; dual('Över 60 Min' ,60)))))) as TidInterval&lt;/P&gt;&lt;P&gt;Basically, I think you were on the right path, but QlikView couldn't recognize 00:15:00 as a time without you telling it explicitly that it was a time. That's what I'm doing with the time#() function. The dual() function is to help with sorting, allowing you to sort the TidInterval numerically. An intervalmatch would probably be more efficient from a load time standpoint, but I think less clear from a maintenance standpoint, particularly with inexperienced developers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2009 23:25:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Class-function-with-time-interval/m-p/214821#M68325</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-10-28T23:25:01Z</dc:date>
    </item>
    <item>
      <title>Class function with time interval</title>
      <link>https://community.qlik.com/t5/QlikView/Class-function-with-time-interval/m-p/214822#M68326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;I was having dificulties on how qlikview could recognize the time.&lt;/P&gt;&lt;P&gt;Your solution works well and I learn something new. Thank you very much. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Arini&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2009 14:23:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Class-function-with-time-interval/m-p/214822#M68326</guid>
      <dc:creator />
      <dc:date>2009-10-29T14:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: Class function with time interval</title>
      <link>https://community.qlik.com/t5/QlikView/Class-function-with-time-interval/m-p/214823#M68327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some charts with time intervals calculated as you suggested in this post, but I have a requirement to always show all interval values even if the expression total for that interval is zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When using a calculated dimension, we don't have the option to "Show all values" and I cannot calculate my dimension in script and use LOAD * INLINE with intervalmatch because my time dimension is a difference between two dates from different tables/sources.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any suggestion to answer this requirement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much in advance,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2014 18:15:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Class-function-with-time-interval/m-p/214823#M68327</guid>
      <dc:creator />
      <dc:date>2014-07-29T18:15:51Z</dc:date>
    </item>
  </channel>
</rss>

