<?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: Best calculation of time difference when the data is in multiple rows of a table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Best-calculation-of-time-difference-when-the-data-is-in-multiple/m-p/918287#M987594</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the first case of the day, there is not calculation.&lt;/P&gt;&lt;P&gt;For the [Test TOT Actual] second case of the day, I start at row 2 and subtract PIR_TIME 7:36 from POR_TIME in row 1 which is 8:03.&lt;/P&gt;&lt;P&gt;This continues for each of the cases in sequential order.&lt;/P&gt;&lt;P&gt;It may appear odd that the cases look like they overlap - in some cases, one physician is doing multiple procedures at one time.&lt;/P&gt;&lt;P&gt;I've done a recursive technique in SQL before to address this; however, am not sure how to "loop" through in Qlik.&lt;/P&gt;&lt;P&gt;Appreciate your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Jul 2015 17:21:30 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-07-28T17:21:30Z</dc:date>
    <item>
      <title>Best calculation of time difference when the data is in multiple rows of a table</title>
      <link>https://community.qlik.com/t5/QlikView/Best-calculation-of-time-difference-when-the-data-is-in-multiple/m-p/918281#M987588</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'd like to get some advice on how best to calculate time difference when the data is in multiple rows of a table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the example below (POR to next PIR) is easy to calculate in Excel by setting the later PIR_TIME minus the earlier POR_TIME for the surgeon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I've tried to recreate this in Qlikview, I keep getting errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've done something similar to this in SQL using a CTE but am not as well-versed as how to handle this dynamically in Qlikview - in the load script, functions, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Welcome your responses!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Karen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="499"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="17" style="border: 0.5pt solid black; border-image: none; background-color: #e1e1e1;" width="144"&gt;&lt;SPAN style="color: #000000;"&gt;PROCEDURE_DATE_DT&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0.5pt 0.5pt 0.5pt 0px; border-style: solid solid solid none; border-color: black; background-color: #e1e1e1;" width="68"&gt;&lt;SPAN style="color: #000000;"&gt;CASE_CONFIRMATION_NUM&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0.5pt 0.5pt 0.5pt 0px; border-style: solid solid solid none; border-color: black; background-color: #e1e1e1;" width="87"&gt;&lt;SPAN style="color: #000000;"&gt;SURGEON&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0.5pt 0.5pt 0.5pt 0px; border-style: solid solid solid none; border-color: black; background-color: #e1e1e1;" width="56"&gt;&lt;SPAN style="color: #000000;"&gt;PIR_TIME&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0.5pt 0.5pt 0.5pt 0px; border-style: solid solid solid none; border-color: black; background-color: #e1e1e1;" width="62"&gt;&lt;SPAN style="color: #000000;"&gt;POR_TIME&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0px 0px; border-style: none solid none none; border-color: black; background-color: #e1e1e1;" width="82"&gt;&lt;SPAN style="color: #000000;"&gt;POR to next PIR&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;07/20/2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;Dr. B&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;07:36&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;09:36&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0.5pt 0.5pt 0.5pt 0px; border-style: solid solid solid none; border-color: windowtext;"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;07/20/2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;Dr. B&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;09:59&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;13:20&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: windowtext;"&gt;&lt;SPAN style="color: #000000;"&gt;23&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;07/20/2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;3&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;Dr. B&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;13:05&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;15:00&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: windowtext;"&gt;&lt;SPAN style="color: #000000;"&gt;-15&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;07/20/2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;4&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;Dr. B&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;14:40&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;16:14&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: windowtext;"&gt;&lt;SPAN style="color: #000000;"&gt;-20&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 14:33:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-calculation-of-time-difference-when-the-data-is-in-multiple/m-p/918281#M987588</guid>
      <dc:creator />
      <dc:date>2015-07-28T14:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: Best calculation of time difference when the data is in multiple rows of a table</title>
      <link>https://community.qlik.com/t5/QlikView/Best-calculation-of-time-difference-when-the-data-is-in-multiple/m-p/918282#M987589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;take min(&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #e1e1e1;"&gt;PIR_TIME) &lt;/SPAN&gt; max(&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #e1e1e1;"&gt;POR_TIME) and calculate the time duratiion&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 14:40:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-calculation-of-time-difference-when-the-data-is-in-multiple/m-p/918282#M987589</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-28T14:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: Best calculation of time difference when the data is in multiple rows of a table</title>
      <link>https://community.qlik.com/t5/QlikView/Best-calculation-of-time-difference-when-the-data-is-in-multiple/m-p/918283#M987590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;if you want to calculate it at the script level&lt;/P&gt;&lt;P&gt;you can use &lt;/P&gt;&lt;P&gt;Load *&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(previous(Surgeon)=Surgeon,PIR_TIME-previous(POR_TIME) ) As POR to next PIR&lt;/P&gt;&lt;P&gt;Resident XXXX&lt;/P&gt;&lt;P&gt;ORDER BY SURGEON ,PROCUDRE_DATE_DT ,CASE_CONFIRMATION_NUM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 14:41:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-calculation-of-time-difference-when-the-data-is-in-multiple/m-p/918283#M987590</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2015-07-28T14:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: Best calculation of time difference when the data is in multiple rows of a table</title>
      <link>https://community.qlik.com/t5/QlikView/Best-calculation-of-time-difference-when-the-data-is-in-multiple/m-p/918284#M987591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Neeti and Liron,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your feedback.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried both of your suggestions (per below) but am still not getting the correct time (in the Test TOT Actual column):&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="545"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="17" style="border: 0.5pt solid black; border-image: none; background-color: #e1e1e1;" width="122"&gt;&lt;SPAN style="color: #000000;"&gt;PROCEDURE_DATE_DT&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0.5pt 0.5pt 0.5pt 0px; border-style: solid solid solid none; border-color: black; background-color: #e1e1e1;" width="56"&gt;&lt;SPAN style="color: #000000;"&gt;PIR_TIME&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0.5pt 0.5pt 0.5pt 0px; border-style: solid solid solid none; border-color: black; background-color: #e1e1e1;" width="62"&gt;&lt;SPAN style="color: #000000;"&gt;POR_TIME&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0.5pt 0.5pt 0.5pt 0px; border-style: solid solid solid none; border-color: black; background-color: #e1e1e1;" width="108"&gt;&lt;SPAN style="color: #000000;"&gt;Test TOT neetha&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0.5pt 0.5pt 0.5pt 0px; border-style: solid solid solid none; border-color: black; background-color: #e1e1e1;" width="112"&gt;&lt;SPAN style="color: #000000;"&gt;Test TOT liron&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0px 0px; border-style: none solid none none; border-color: black; background-color: #e1e1e1;" width="85"&gt;&lt;SPAN style="color: #000000;"&gt;Test TOT Actual&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;07/20/2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;07:15&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;08:03&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;-182&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border-width: 0px 0px 0.5pt; border-style: none none solid; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;-48&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0.5pt solid windowtext; border-image: none;"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;07/20/2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;07:36&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;09:36&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;-518&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border-width: 0px 0px 0.5pt; border-style: none none solid; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;-120&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: windowtext;"&gt;&lt;SPAN style="color: #000000;"&gt;-27&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;07/20/2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;09:11&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;10:17&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;-349&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border-width: 0px 0px 0.5pt; border-style: none none solid; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;-66&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: windowtext;"&gt;&lt;SPAN style="color: #000000;"&gt;-25&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;07/20/2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;09:59&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;13:20&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;23&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border-width: 0px 0px 0.5pt; border-style: none none solid; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;-201&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: windowtext;"&gt;&lt;SPAN style="color: #000000;"&gt;-18&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;07/20/2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;13:05&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;15:00&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;-306&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border-width: 0px 0px 0.5pt; border-style: none none solid; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;-115&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: windowtext;"&gt;&lt;SPAN style="color: #000000;"&gt;-15&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;07/20/2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;14:40&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;16:14&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;-&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border-width: 0px 0px 0.5pt; border-style: none none solid; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;-94&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: windowtext;"&gt;&lt;SPAN style="color: #000000;"&gt;-20&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;07/20/2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;16:16&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;18:11&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;-&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border-width: 0px 0px 0.5pt; border-style: none none solid; border-color: black; background-color: white;"&gt;&lt;SPAN style="color: #000000;"&gt;-115&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: windowtext;"&gt;&lt;SPAN style="color: #000000;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 15:18:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-calculation-of-time-difference-when-the-data-is-in-multiple/m-p/918284#M987591</guid>
      <dc:creator />
      <dc:date>2015-07-28T15:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: Best calculation of time difference when the data is in multiple rows of a table</title>
      <link>https://community.qlik.com/t5/QlikView/Best-calculation-of-time-difference-when-the-data-is-in-multiple/m-p/918285#M987592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi wallace,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what are the values in Test TOT Actual column.&lt;/P&gt;&lt;P&gt;are they mins ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 17:12:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-calculation-of-time-difference-when-the-data-is-in-multiple/m-p/918285#M987592</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-28T17:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: Best calculation of time difference when the data is in multiple rows of a table</title>
      <link>https://community.qlik.com/t5/QlikView/Best-calculation-of-time-difference-when-the-data-is-in-multiple/m-p/918286#M987593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how did you arrive the result for the column&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 17:13:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-calculation-of-time-difference-when-the-data-is-in-multiple/m-p/918286#M987593</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-28T17:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: Best calculation of time difference when the data is in multiple rows of a table</title>
      <link>https://community.qlik.com/t5/QlikView/Best-calculation-of-time-difference-when-the-data-is-in-multiple/m-p/918287#M987594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the first case of the day, there is not calculation.&lt;/P&gt;&lt;P&gt;For the [Test TOT Actual] second case of the day, I start at row 2 and subtract PIR_TIME 7:36 from POR_TIME in row 1 which is 8:03.&lt;/P&gt;&lt;P&gt;This continues for each of the cases in sequential order.&lt;/P&gt;&lt;P&gt;It may appear odd that the cases look like they overlap - in some cases, one physician is doing multiple procedures at one time.&lt;/P&gt;&lt;P&gt;I've done a recursive technique in SQL before to address this; however, am not sure how to "loop" through in Qlik.&lt;/P&gt;&lt;P&gt;Appreciate your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 17:21:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-calculation-of-time-difference-when-the-data-is-in-multiple/m-p/918287#M987594</guid>
      <dc:creator />
      <dc:date>2015-07-28T17:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: Best calculation of time difference when the data is in multiple rows of a table</title>
      <link>https://community.qlik.com/t5/QlikView/Best-calculation-of-time-difference-when-the-data-is-in-multiple/m-p/918288#M987595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think Liron already suggested a possible answer&lt;/P&gt;&lt;P&gt;Another could be (if CASE_CONF.... are progressive values) a join of the table with the same table (same surgeon, procedure_date, CASE_CONF = CASE_CONF +1) so you have pir_time and previuos row por_time on the same row&lt;/P&gt;&lt;P&gt;If you can post some data, qvd or excel or qvw...........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 17:26:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-calculation-of-time-difference-when-the-data-is-in-multiple/m-p/918288#M987595</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-07-28T17:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: Best calculation of time difference when the data is in multiple rows of a table</title>
      <link>https://community.qlik.com/t5/QlikView/Best-calculation-of-time-difference-when-the-data-is-in-multiple/m-p/918289#M987596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Wallace,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try below solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;load * inline&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;PROCEDURE_DATE_DT,PIR_TIME,POR_TIME&amp;nbsp; &lt;/P&gt;&lt;P&gt;07/20/2015,07:15,08:03&lt;/P&gt;&lt;P&gt;07/20/2015,07:36,09:36&lt;/P&gt;&lt;P&gt;07/20/2015,09:11,10:17&lt;/P&gt;&lt;P&gt;07/20/2015,09:59,13:20&lt;/P&gt;&lt;P&gt;07/20/2015,13:05,15:00&lt;/P&gt;&lt;P&gt;07/20/2015,14:40,16:14&lt;/P&gt;&lt;P&gt;07/20/2015,16:16,18:11&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;if(PROCEDURE_DATE_DT = Peek(PROCEDURE_DATE_DT ),&amp;nbsp; Interval(PIR_TIME-Previous(POR_TIME) ,'')) as TimeBetweentransactions&lt;/P&gt;&lt;P&gt;Resident Data;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Timediff.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/94309_Timediff.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt; hope it helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Neetha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 17:40:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-calculation-of-time-difference-when-the-data-is-in-multiple/m-p/918289#M987596</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-28T17:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: Best calculation of time difference when the data is in multiple rows of a table</title>
      <link>https://community.qlik.com/t5/QlikView/Best-calculation-of-time-difference-when-the-data-is-in-multiple/m-p/918290#M987597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Neetha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a great suggestion - thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just need to clean up some synthetic keys that are being generated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Much appreciation!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 18:11:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-calculation-of-time-difference-when-the-data-is-in-multiple/m-p/918290#M987597</guid>
      <dc:creator />
      <dc:date>2015-07-28T18:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: Best calculation of time difference when the data is in multiple rows of a table</title>
      <link>https://community.qlik.com/t5/QlikView/Best-calculation-of-time-difference-when-the-data-is-in-multiple/m-p/918291#M987598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Massimo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a good suggestion - I will try to do the table join and re-post!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Much appreciation!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 18:12:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-calculation-of-time-difference-when-the-data-is-in-multiple/m-p/918291#M987598</guid>
      <dc:creator />
      <dc:date>2015-07-28T18:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: Best calculation of time difference when the data is in multiple rows of a table</title>
      <link>https://community.qlik.com/t5/QlikView/Best-calculation-of-time-difference-when-the-data-is-in-multiple/m-p/918292#M987599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;z:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load field1, field2, Evaluate(pir) as pir, Evaluate(por) as por inline [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;field1, field2, pir, &lt;STRONG&gt;por&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;a,1, 1/24, &lt;STRONG&gt;2/24&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;a,2, 3/24, &lt;STRONG&gt;4/24&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;a,3, 5/24, 6/24&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;b,1, 17/24, 18/24&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;b,2, 20/24, 22/24&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;b,3, 23/24, 0.99999&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;left join (z)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;field1, field2+1 as field2, por as por_prevrow&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident z; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/94324_1.png" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 18:24:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-calculation-of-time-difference-when-the-data-is-in-multiple/m-p/918292#M987599</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-07-28T18:24:01Z</dc:date>
    </item>
    <item>
      <title>Re: Best calculation of time difference when the data is in multiple rows of a table</title>
      <link>https://community.qlik.com/t5/QlikView/Best-calculation-of-time-difference-when-the-data-is-in-multiple/m-p/918293#M987600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Hi Massimo,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thank you very much for your example.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;My only caveat is that the CASE_CONFIRMATION_NUMBER may not be sequential, hence cannot assume it is +1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;I will work on tweaking the LEFT join.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 18:34:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-calculation-of-time-difference-when-the-data-is-in-multiple/m-p/918293#M987600</guid>
      <dc:creator />
      <dc:date>2015-07-28T18:34:00Z</dc:date>
    </item>
  </channel>
</rss>

