<?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: Equipment Utilization by Hour in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Equipment-Utilization-by-Hour/m-p/932333#M322197</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did make a mistake in my buckets which may have led to confusion. I have fixed the time frame for bucket 2 above. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's why the seconds need to be split into 2 buckets:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Item 2 was put put in use on &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;2015-11-01 at 00:59:51 and used for 24 seconds, therefore ending in the next hour at 01:00:15. &lt;/SPAN&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.3333px;"&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; font-size: 13.3333px;"&gt;My goal is to determine how much of the possible time per hour Item 1 was used. I can't put the entire 24 seconds in Bucket 1, as the item was only in use for 9 seconds in that hour. I can't put the entire 24 seconds into Bucket 2 as it was only in use for 15 seconds of that hour. &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px; line-height: 1.5em;"&gt;So I need to put the first 9 seconds in Bucket 1 &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;and the remainder into Bucket 2. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; 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-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Thanks for your help!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Dec 2015 18:32:05 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-12-01T18:32:05Z</dc:date>
    <item>
      <title>Equipment Utilization by Hour</title>
      <link>https://community.qlik.com/t5/QlikView/Equipment-Utilization-by-Hour/m-p/932331#M322195</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;I am looking to determine the utilization of equipment by hour. I have created hour buckets and can use IntervalMatch to get the sum of the SecondsUsed based on start time, but what do I do if the SecondsUsed runs over into the next bucket? Are buckets the wrong approach for this? My main goal is to determine the busiest periods based on utilization. A bonus would be to determine how often all 4 machines are in use...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take, for example, the first row from my data below:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;StartTimestamp: &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;2015-11-01 00:59:51.000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;SecondsUsed: &lt;SPAN style="font-size: 13.3333px;"&gt;24&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;ItemID&lt;/SPAN&gt;: 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore the usage for that one record should be split between two buckets:&lt;/P&gt;&lt;P&gt;Bucket: 1&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;StartTime: 2015-11-01 00:00:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;EndTime: &lt;SPAN style="font-size: 13.3333px;"&gt;2015-11-01 00:59:59&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Usage: 9 seconds&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Bucket: 2&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;StartTime: 2015-11-01 01:00:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;EndTime: &lt;SPAN style="font-size: 13.3333px;"&gt;2015-11-01 01:59:59&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Usage: 15 seconds&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Here is an example of the raw utilization data that I have:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fact:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; StartTimestamp, SecondsUsed, ItemID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2015-11-01 00:59:51.000, 24, 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2015-11-01 00:47:40.000, 24, 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2015-11-01 00:49:49.000, 30, 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2015-11-01 12:50:19.000, 31, 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2015-11-02 00:51:12.000, 30, 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2015-11-02 12:51:53.000, 30, 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2015-11-02 16:06:32.000, 28, 2&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if any more details would be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for any and all help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2015 17:11:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Equipment-Utilization-by-Hour/m-p/932331#M322195</guid>
      <dc:creator />
      <dc:date>2015-12-01T17:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: Equipment Utilization by Hour</title>
      <link>https://community.qlik.com/t5/QlikView/Equipment-Utilization-by-Hour/m-p/932332#M322196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure how the data is getting divided into two buckets. How did you derive 9 seconds and 15 seconds?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2015 18:18:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Equipment-Utilization-by-Hour/m-p/932332#M322196</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-12-01T18:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: Equipment Utilization by Hour</title>
      <link>https://community.qlik.com/t5/QlikView/Equipment-Utilization-by-Hour/m-p/932333#M322197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did make a mistake in my buckets which may have led to confusion. I have fixed the time frame for bucket 2 above. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's why the seconds need to be split into 2 buckets:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Item 2 was put put in use on &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;2015-11-01 at 00:59:51 and used for 24 seconds, therefore ending in the next hour at 01:00:15. &lt;/SPAN&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.3333px;"&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; font-size: 13.3333px;"&gt;My goal is to determine how much of the possible time per hour Item 1 was used. I can't put the entire 24 seconds in Bucket 1, as the item was only in use for 9 seconds in that hour. I can't put the entire 24 seconds into Bucket 2 as it was only in use for 15 seconds of that hour. &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px; line-height: 1.5em;"&gt;So I need to put the first 9 seconds in Bucket 1 &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;and the remainder into Bucket 2. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; 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-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Thanks for your help!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2015 18:32:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Equipment-Utilization-by-Hour/m-p/932333#M322197</guid>
      <dc:creator />
      <dc:date>2015-12-01T18:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: Equipment Utilization by Hour</title>
      <link>https://community.qlik.com/t5/QlikView/Equipment-Utilization-by-Hour/m-p/932334#M322198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IntervalMatch() and time buckets would be the way I would go.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have done something similar for comparing staff rostered hours vs. staff actual hours.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each staff member has various dimensions such as Department and Location so I can select and slice 'n dice with them.&amp;nbsp; I can show count of staff rostered [or actually on site]&amp;nbsp; per time bucket - in my case 15 minute buckets and display on a Line Chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sounds like you need your [Machine ID] as a dimension.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2015 18:39:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Equipment-Utilization-by-Hour/m-p/932334#M322198</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-01T18:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: Equipment Utilization by Hour</title>
      <link>https://community.qlik.com/t5/QlikView/Equipment-Utilization-by-Hour/m-p/932335#M322199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Bill. The [ItemID] field in my data is the machine's id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I agree that buckets and an IntervalMatch would work if everything fit nicely into one bucket or the other, but my question is what do I do with those records that span multiple buckets? It seems like a simple problem, but it's got me stumped. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for the help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2015 21:09:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Equipment-Utilization-by-Hour/m-p/932335#M322199</guid>
      <dc:creator />
      <dc:date>2015-12-01T21:09:33Z</dc:date>
    </item>
    <item>
      <title>Re: Equipment Utilization by Hour</title>
      <link>https://community.qlik.com/t5/QlikView/Equipment-Utilization-by-Hour/m-p/932336#M322200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Fact:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD StartTimestamp,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; SecondsUsed,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; ItemID,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Interval(If(StartEndHour - StartTimestamp &amp;gt;= SecondsUsed/(24*60*60), SecondsUsed/(24*60*60), StartEndHour - StartTimestamp), 's') as Bucket1,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Interval(If(EndTimestamp - StartEndHour &amp;lt;= 0, 0, EndTimestamp - StartEndHour), 's') as Bucket2;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; TimeStamp(StartTimestamp + SecondsUsed/(24*60*60)) as EndTimestamp,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; TimeStamp(Ceil(StartTimestamp, (1/(24*60)))) as StartEndHour;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * INLINE [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; StartTimestamp, SecondsUsed, ItemID&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2015-11-01 00:59:51.000, 24, 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2015-11-01 00:47:40.000, 24, 3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2015-11-01 00:49:49.000, 30, 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2015-11-01 12:50:19.000, 31, 0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2015-11-02 00:51:12.000, 30, 3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2015-11-02 12:51:53.000, 30, 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2015-11-02 16:06:32.000, 28, 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/107788_Capture.PNG" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2015 21:53:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Equipment-Utilization-by-Hour/m-p/932336#M322200</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-12-01T21:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: Equipment Utilization by Hour</title>
      <link>https://community.qlik.com/t5/QlikView/Equipment-Utilization-by-Hour/m-p/932337#M322201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: verdana, geneva;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: verdana, geneva;"&gt;One solution is to create a Master Time Calendar and with IntervalMatch function to count the number of seconds of the equipment's utilization on hour.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: verdana, geneva;"&gt;More information about Master Time Calendar you can find below blog:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3206"&gt;The Master Time Table&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: verdana, geneva;"&gt;You can find in the attached file my approach for this. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: verdana, geneva;"&gt;Hope this helps.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: verdana, geneva;"&gt;P.S. Reload the file. I removed all the values because of the file's size.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Dec 2015 12:06:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Equipment-Utilization-by-Hour/m-p/932337#M322201</guid>
      <dc:creator>ElizaF</dc:creator>
      <dc:date>2015-12-02T12:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: Equipment Utilization by Hour</title>
      <link>https://community.qlik.com/t5/QlikView/Equipment-Utilization-by-Hour/m-p/932338#M322202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This was very promising, until I found out that some tasks span more than 2 buckets. This was not reflected in the test data i was given and presented here, so not a reflection on your solution at all. I think I would need to build a large number of Buckets with conditional statements like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Interval(If(EndTimestamp - StartEndHour &amp;lt;= 0, 0, if(EndTimestamp - StartEndHour &amp;gt; 3600, 3600, &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;EndTimestamp - StartEndHour&lt;/STRONG&gt;), 's') as Bucket2,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Interval(If(EndTimestamp - StartEndHour &amp;lt;= 0, 0, if(EndTimestamp - StartEndHour &amp;gt; 7200, 3600, &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;EndTimestamp - StartEndHour-3600&lt;/STRONG&gt;), 's') as Bucket3,&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;and so on...&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I appreciate the help, but I think I need to find a way to handle N buckets.&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Dec 2015 19:46:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Equipment-Utilization-by-Hour/m-p/932338#M322202</guid>
      <dc:creator />
      <dc:date>2015-12-02T19:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: Equipment Utilization by Hour</title>
      <link>https://community.qlik.com/t5/QlikView/Equipment-Utilization-by-Hour/m-p/932339#M322203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's understandable and I agree that you will have to decide how you want the buckets to be created. We can guide you only to the extent of what is provided to us &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I hope you have a way to move forward from here&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Dec 2015 20:03:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Equipment-Utilization-by-Hour/m-p/932339#M322203</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-12-02T20:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: Equipment Utilization by Hour</title>
      <link>https://community.qlik.com/t5/QlikView/Equipment-Utilization-by-Hour/m-p/932340#M322204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jonathan, please check the below script. I am simply creating new row if End Time stamp is in different hour.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// More Buckests purpose I took Secs as Mins&lt;/P&gt;&lt;P&gt;TempFactData:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; *,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Timestamp(StartTimestamp + (MinsUsed/(24*60))) AS EndTimeStamp&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; StartTimestamp, MinsUsed, ItemID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2015-11-01 00:59:51, 24, 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2015-11-01 00:47:40, 24, 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2015-11-01 00:49:49, 30, 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2015-11-01 12:50:19, 181, 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2015-11-02 00:51:12, 30, 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2015-11-02 12:51:53, 30, 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2015-11-02 16:06:32, 28, 2&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FactData:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; ItemID,&lt;/P&gt;&lt;P&gt;// /*&lt;/P&gt;&lt;P&gt;&amp;nbsp; StartTimestamp,&lt;/P&gt;&lt;P&gt;&amp;nbsp; EndTimeStamp,&lt;/P&gt;&lt;P&gt;&amp;nbsp; MinsUsed,&lt;/P&gt;&lt;P&gt;&amp;nbsp; CounterFlag,&lt;/P&gt;&lt;P&gt;// */&lt;/P&gt;&lt;P&gt;&amp;nbsp; DateHour,&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(CounterFlag=1, ceil(((DateHour+(1/24))-StartTimestamp)*24*60*60),&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(Hour(DateHour)=Hour(EndTimeStamp) AND Floor(EndTimeStamp)=Floor(DateHour) , ceil((EndTimeStamp-DateHour)*24*60*60) ,3600)&lt;/P&gt;&lt;P&gt;&amp;nbsp; )&amp;nbsp; AS SecsUsedPerHr&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; ItemID,&lt;/P&gt;&lt;P&gt;&amp;nbsp; StartTimestamp,&lt;/P&gt;&lt;P&gt;&amp;nbsp; EndTimeStamp,&lt;/P&gt;&lt;P&gt;&amp;nbsp; MinsUsed,&lt;/P&gt;&lt;P&gt;&amp;nbsp; IterNo() AS CounterFlag,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Floor(StartTimestamp) + ((Hour(StartTimestamp)+IterNo()-1)/24) AS DateHour&lt;/P&gt;&lt;P&gt;Resident TempFactData&lt;/P&gt;&lt;P&gt;While IterNo() &amp;lt;= ((Floor(EndTimeStamp)-Floor(StartTimestamp))*24) + Hour(EndTimeStamp) - Hour(StartTimestamp) + 1&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table TempFactData;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Dec 2015 21:28:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Equipment-Utilization-by-Hour/m-p/932340#M322204</guid>
      <dc:creator />
      <dc:date>2015-12-02T21:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: Equipment Utilization by Hour</title>
      <link>https://community.qlik.com/t5/QlikView/Equipment-Utilization-by-Hour/m-p/932341#M322205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan,&lt;/P&gt;&lt;P&gt;You don't need N buckets. You need only 24 bucket for 24 hours.&lt;/P&gt;&lt;P&gt;So, can be solved if is created one master time table (with 1 second interval) and linked with the fact table, in order to count the number of seconds per hour / equipment, based on start time and SecondsUsed. See file attached.&lt;/P&gt;&lt;P&gt;Final result will be as in the table below. I think this is what you need.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="tabel.jpg" class="jive-image image-1" height="149" src="https://community.qlik.com/legacyfs/online/107905_tabel.jpg" style="height: 149.206px; width: 593px;" width="593" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Dec 2015 22:15:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Equipment-Utilization-by-Hour/m-p/932341#M322205</guid>
      <dc:creator>ElizaF</dc:creator>
      <dc:date>2015-12-02T22:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: Equipment Utilization by Hour</title>
      <link>https://community.qlik.com/t5/QlikView/Equipment-Utilization-by-Hour/m-p/932342#M322206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much for this code. Exactly what I was hoping to achieve!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And thanks to everyone for helping out. This was my first post on the Community and I have to say it rocks. Keep up the good work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2015 16:01:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Equipment-Utilization-by-Hour/m-p/932342#M322206</guid>
      <dc:creator />
      <dc:date>2015-12-04T16:01:37Z</dc:date>
    </item>
  </channel>
</rss>

