<?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 Capture true time interval (it's a brain teaser) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Capture-true-time-interval-it-s-a-brain-teaser/m-p/155794#M31901</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;i would suggest the following load script to calculate the "Real" delay time each delay has. For this to work you must ensure that the records are sorted by ORDER_CDE and by start time:&lt;/P&gt;&lt;P&gt;Directory;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;LOAD&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;ORDER_CDE, &lt;P&gt;ORDER_DELAY.ENTERED_DTE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;ORDER_DELAY.CMPLTD_DTE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;[Delay Turn Time]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;[Order to completion Turn Time]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;//Check with previous record&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;If(previous(ORDER_CDE)=ORDER_CDE, &lt;P&gt;IF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(ORDER_DELAY.ENTERED_DTE &amp;lt; previous(ORDER_DELAY.CMPLTD_DTE),&lt;/P&gt;&lt;P&gt;IF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;(ORDER_DELAY.CMPLTD_DTE &amp;lt; previous(ORDER_DELAY.CMPLTD_DTE),0,&lt;/P&gt;&lt;P&gt;ORDER_DELAY.CMPLTD_DTE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;-previous(ORDER_DELAY.CMPLTD_DTE)),&lt;/P&gt;&lt;P&gt;ORDER_DELAY.CMPLTD_DTE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;-ORDER_DELAY.ENTERED_DTE),&lt;/P&gt;&lt;P&gt;ORDER_DELAY.CMPLTD_DTE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-ORDER_DELAY.ENTERED_DTE) &lt;B&gt;as&lt;/B&gt; RealDelayTime&lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;FROM&lt;/P&gt;&lt;P&gt;example.xls&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;biff, embedded labels, table is Sheet1$);&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Joao&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Aug 2009 20:36:11 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-08-12T20:36:11Z</dc:date>
    <item>
      <title>Capture true time interval (it's a brain teaser)</title>
      <link>https://community.qlik.com/t5/QlikView/Capture-true-time-interval-it-s-a-brain-teaser/m-p/155793#M31900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to capture a turn time order to completion. I have to subtract out all the time an order was on dealy from the order to completion interval to get an accurate number.&lt;/P&gt;&lt;P&gt;The issue is that there can be multiple delays on and order and they can stop and start at any time. In some cases a multiple dealys may start before a previous delay is completed. I can capture the turn time of the delay entry to completion but I want to be able to subtract out the over lapping time if that makes sense.&lt;/P&gt;&lt;P&gt;The solution may not be QlikView specific. There may be a way to do this in SQL? I am including an example of one order with multiple delays to illustrate the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2009 19:34:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Capture-true-time-interval-it-s-a-brain-teaser/m-p/155793#M31900</guid>
      <dc:creator />
      <dc:date>2009-08-12T19:34:42Z</dc:date>
    </item>
    <item>
      <title>Capture true time interval (it's a brain teaser)</title>
      <link>https://community.qlik.com/t5/QlikView/Capture-true-time-interval-it-s-a-brain-teaser/m-p/155794#M31901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;i would suggest the following load script to calculate the "Real" delay time each delay has. For this to work you must ensure that the records are sorted by ORDER_CDE and by start time:&lt;/P&gt;&lt;P&gt;Directory;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;LOAD&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;ORDER_CDE, &lt;P&gt;ORDER_DELAY.ENTERED_DTE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;ORDER_DELAY.CMPLTD_DTE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;[Delay Turn Time]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;[Order to completion Turn Time]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;//Check with previous record&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;If(previous(ORDER_CDE)=ORDER_CDE, &lt;P&gt;IF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(ORDER_DELAY.ENTERED_DTE &amp;lt; previous(ORDER_DELAY.CMPLTD_DTE),&lt;/P&gt;&lt;P&gt;IF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;(ORDER_DELAY.CMPLTD_DTE &amp;lt; previous(ORDER_DELAY.CMPLTD_DTE),0,&lt;/P&gt;&lt;P&gt;ORDER_DELAY.CMPLTD_DTE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;-previous(ORDER_DELAY.CMPLTD_DTE)),&lt;/P&gt;&lt;P&gt;ORDER_DELAY.CMPLTD_DTE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;-ORDER_DELAY.ENTERED_DTE),&lt;/P&gt;&lt;P&gt;ORDER_DELAY.CMPLTD_DTE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-ORDER_DELAY.ENTERED_DTE) &lt;B&gt;as&lt;/B&gt; RealDelayTime&lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;FROM&lt;/P&gt;&lt;P&gt;example.xls&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;biff, embedded labels, table is Sheet1$);&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Joao&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2009 20:36:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Capture-true-time-interval-it-s-a-brain-teaser/m-p/155794#M31901</guid>
      <dc:creator />
      <dc:date>2009-08-12T20:36:11Z</dc:date>
    </item>
    <item>
      <title>Capture true time interval (it's a brain teaser)</title>
      <link>https://community.qlik.com/t5/QlikView/Capture-true-time-interval-it-s-a-brain-teaser/m-p/155795#M31902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, let me play around with this and see what I can come up with&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2009 20:39:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Capture-true-time-interval-it-s-a-brain-teaser/m-p/155795#M31902</guid>
      <dc:creator />
      <dc:date>2009-08-12T20:39:17Z</dc:date>
    </item>
  </channel>
</rss>

