<?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: GPS - Count the stop time in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/GPS-Count-the-stop-time/m-p/724117#M1062701</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Marco !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems that worked ! I'm gonna test and return to you !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for contribution ! Can you explain to me how are you doing it?&lt;/P&gt;&lt;P&gt;Didnt understand this line:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 1.5em; background-color: #f8f8f8;"&gt;Pick((Ignition-Previous(Ignition))/2+1.5,'Falling','Rising') as EdgeType&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 1.5em; background-color: #f8f8f8;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 1.5em; background-color: #f8f8f8;"&gt;Morandi&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Sep 2014 13:27:37 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-09-22T13:27:37Z</dc:date>
    <item>
      <title>GPS - Count the stop time</title>
      <link>https://community.qlik.com/t5/QlikView/GPS-Count-the-stop-time/m-p/724110#M1062694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Guys, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to create a expression to insert into a label. &lt;/P&gt;&lt;P&gt;In this expression, i have to use this data:&lt;/P&gt;&lt;P&gt;Date/hour, ID_Path, Ignition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So what i need to do is:&lt;/P&gt;&lt;P&gt;I need to count the amount of downtime. It tells the time between ignition 0 (off) and the Ignition 1 (on) = date/hour(ignition 1) - date/hour(ignition 0)&lt;/P&gt;&lt;P&gt;The problem is I have several identical / different records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="282"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" width="154"&gt;Date/Hour,&lt;/TD&gt;&lt;TD class="xl63" width="64"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ignition&lt;/TD&gt;&lt;TD class="xl63" width="64"&gt; id_path,&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20"&gt;2014-09-08 00:16:32.000&lt;/TD&gt;&lt;TD class="xl64"&gt;0&lt;/TD&gt;&lt;TD class="xl64"&gt;17215967&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20"&gt;2014-09-08 00:36:42.000&lt;/TD&gt;&lt;TD class="xl64"&gt;0&lt;/TD&gt;&lt;TD class="xl64"&gt;17211123&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20"&gt;2014-09-08 00:56:52.000&lt;/TD&gt;&lt;TD class="xl64"&gt;0&lt;/TD&gt;&lt;TD class="xl64"&gt;17204958&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20"&gt;2014-09-08 01:17:01.000&lt;/TD&gt;&lt;TD class="xl64"&gt;0&lt;/TD&gt;&lt;TD class="xl64"&gt;17259288&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20"&gt;2014-09-08 01:37:11.000&lt;/TD&gt;&lt;TD class="xl64"&gt;0&lt;/TD&gt;&lt;TD class="xl64"&gt;17258500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20"&gt;2014-09-08 01:57:21.000&lt;/TD&gt;&lt;TD class="xl64"&gt;0&lt;/TD&gt;&lt;TD class="xl64"&gt;17257560&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20"&gt;2014-09-08 02:04:47.000&lt;/TD&gt;&lt;TD class="xl64"&gt;1&lt;/TD&gt;&lt;TD class="xl64"&gt;17257350&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20"&gt;2014-09-08 02:05:12.000&lt;/TD&gt;&lt;TD class="xl64"&gt;1&lt;/TD&gt;&lt;TD class="xl64"&gt;17260469&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20"&gt;2014-09-08 02:05:36.000&lt;/TD&gt;&lt;TD class="xl64"&gt;1&lt;/TD&gt;&lt;TD class="xl64"&gt;17259887&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20"&gt;2014-09-08 02:05:54.000&lt;/TD&gt;&lt;TD class="xl64"&gt;1&lt;/TD&gt;&lt;TD class="xl64"&gt;0206088&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20"&gt;2014-09-08 02:06:35.000&lt;/TD&gt;&lt;TD class="xl64"&gt;1&lt;/TD&gt;&lt;TD class="xl64"&gt;3348442&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20"&gt;2014-09-08 02:08:29.000&lt;/TD&gt;&lt;TD class="xl64"&gt;1&lt;/TD&gt;&lt;TD class="xl64"&gt;15325993&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20"&gt;2014-09-08 02:08:34.000&lt;/TD&gt;&lt;TD class="xl64"&gt;1&lt;/TD&gt;&lt;TD class="xl64"&gt;13646438&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20"&gt;2014-09-08 02:08:46.000&lt;/TD&gt;&lt;TD class="xl64"&gt;1&lt;/TD&gt;&lt;TD class="xl64"&gt;3773396&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20"&gt;2014-09-08 02:09:05.000&lt;/TD&gt;&lt;TD class="xl64"&gt;1&lt;/TD&gt;&lt;TD class="xl64"&gt;4473620&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20"&gt;2014-09-08 02:09:16.000&lt;/TD&gt;&lt;TD class="xl64"&gt;0&lt;/TD&gt;&lt;TD class="xl64"&gt;6473289&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20"&gt;2014-09-08 02:10:10.000&lt;/TD&gt;&lt;TD class="xl64"&gt;1&lt;/TD&gt;&lt;TD class="xl64"&gt;5172137&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20"&gt;2014-09-08 02:10:27.000&lt;/TD&gt;&lt;TD class="xl64"&gt;1&lt;/TD&gt;&lt;TD class="xl64"&gt;9388413&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20"&gt;2014-09-08 02:10:53.000&lt;/TD&gt;&lt;TD class="xl64"&gt;1&lt;/TD&gt;&lt;TD class="xl64"&gt;17259864&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20"&gt;2014-09-08 02:11:24.000&lt;/TD&gt;&lt;TD class="xl64"&gt;1&lt;/TD&gt;&lt;TD class="xl64"&gt;17259854&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20"&gt;2014-09-08 02:12:12.000&lt;/TD&gt;&lt;TD class="xl64"&gt;1&lt;/TD&gt;&lt;TD class="xl64"&gt;17261094&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20"&gt;2014-09-08 02:13:03.000&lt;/TD&gt;&lt;TD class="xl64"&gt;1&lt;/TD&gt;&lt;TD class="xl64"&gt;17261092&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20"&gt;2014-09-08 02:13:28.000&lt;/TD&gt;&lt;TD class="xl64"&gt;1&lt;/TD&gt;&lt;TD class="xl64"&gt;17261081&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20"&gt;2014-09-08 02:14:04.000&lt;/TD&gt;&lt;TD class="xl64"&gt;1&lt;/TD&gt;&lt;TD class="xl64"&gt;17261068&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to count the downtime of each ID_Path (to say the total downtime of everybody and the max downtime). The data is not sorted by id_path but by the Date / Hour in the file. So have no idea how to get the total downtime of all ID_Path and acquire the number of ID_Path bigger and less downtime.&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, 17 Sep 2014 18:35:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GPS-Count-the-stop-time/m-p/724110#M1062694</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-17T18:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: GPS - Count the stop time</title>
      <link>https://community.qlik.com/t5/QlikView/GPS-Count-the-stop-time/m-p/724111#M1062695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how is down time computed ?&amp;nbsp;&amp;nbsp; For an ID do you get the Date/Hour when ignition = 0 and count the days and hours until there is a row where ignition = 1 for that ID ?&amp;nbsp;&amp;nbsp; This looks like a list of ignition status changes. But i don't think any of the IDs have 2 records where 1 record is 0 and another is 1...&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 18:46:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GPS-Count-the-stop-time/m-p/724111#M1062695</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-09-17T18:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: GPS - Count the stop time</title>
      <link>https://community.qlik.com/t5/QlikView/GPS-Count-the-stop-time/m-p/724112#M1062696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Down time is the amount of time which a vehicle is turned off and turned on.&lt;/P&gt;&lt;P&gt;It is calculated always for Yesterday (but now i'm using a fictcial data). But this is calculated for only 1 day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;For an ID do you get the Date/Hour when ignition = 0 and count the days and hours until there is a row where ignition = 1 for that ID ?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yes ! You are correct. But i need the total of all ID too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;This looks like a list of ignition status changes. But i don't think any of the IDs have 2 records where 1 record is 0 and another is 1... &lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yes, its a status changes Time. In the example i've gave maybe dont have, BUT, it exists. And i need to know how to calculate it. I can set this in script or/and in the expression. The best way, i can do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks !&lt;/P&gt;&lt;P&gt;Morandi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 19:17:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GPS-Count-the-stop-time/m-p/724112#M1062696</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-17T19:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: GPS - Count the stop time</title>
      <link>https://community.qlik.com/t5/QlikView/GPS-Count-the-stop-time/m-p/724113#M1062697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can the ID go from On to Off and back again ?&amp;nbsp; just wondering what the permutations are. thats important.&amp;nbsp; maybe if you have a sample set of data with all the different permutations that would be helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 19:23:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GPS-Count-the-stop-time/m-p/724113#M1062697</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-09-17T19:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: Re: GPS - Count the stop time</title>
      <link>https://community.qlik.com/t5/QlikView/GPS-Count-the-stop-time/m-p/724114#M1062698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Only Ignition turn on (1) or off (0). The ID never changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample Attached. In the ID_PATH, use the function left(ID_PATH,5) to get the&amp;nbsp; correct information of ID_PATH.&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, 17 Sep 2014 20:36:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GPS-Count-the-stop-time/m-p/724114#M1062698</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-17T20:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: GPS - Count the stop time</title>
      <link>https://community.qlik.com/t5/QlikView/GPS-Count-the-stop-time/m-p/724115#M1062699</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;one possible solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro _jivemacro_uid_14109904074939445 jive_macro_code" jivemacro_uid="_14109904074939445"&gt;
&lt;P&gt;tabData:&lt;/P&gt;
&lt;P&gt;LOAD Timestamp(YearStart(Today())+Rand()*DayNumberOfYear(Today())) as [Date/Hour],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Round(Rand()) as Ignition,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10000000+Floor(Rand()*40) as [id_path]&lt;/P&gt;
&lt;P&gt;AutoGenerate 1000;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;tabDowntimes:&lt;/P&gt;
&lt;P&gt;LOAD Previous([Date/Hour]) as [Date/Hour],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Interval(EdgeTime-Previous(EdgeTime), 'dd hh:mm:ss') as Downtime&lt;/P&gt;
&lt;P&gt;Where EdgeType='Rising' and [id_path]=Previous([id_path]);&lt;/P&gt;
&lt;P&gt;LOAD [id_path],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Date/Hour],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Date/Hour] as EdgeTime,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pick((Ignition-Previous(Ignition))/2+1.5,'Falling','Rising') as EdgeType&lt;/P&gt;
&lt;P&gt;Resident tabData&lt;/P&gt;
&lt;P&gt;Where Ignition-Previous(Ignition)&lt;/P&gt;
&lt;P&gt;Order By [id_path], [Date/Hour];&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_133815_Pic1.JPG.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/67029_QlikCommunity_Thread_133815_Pic1.JPG.jpg" style="width: 620px; height: 217px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_133815_Pic2.JPG.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/67030_QlikCommunity_Thread_133815_Pic2.JPG.jpg" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_133815_Pic3.JPG.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/67040_QlikCommunity_Thread_133815_Pic3.JPG.jpg" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 21:47:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GPS-Count-the-stop-time/m-p/724115#M1062699</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-09-17T21:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: Re: GPS - Count the stop time</title>
      <link>https://community.qlik.com/t5/QlikView/GPS-Count-the-stop-time/m-p/724116#M1062700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;or with your sample data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_133815_Pic4.JPG.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/67042_QlikCommunity_Thread_133815_Pic4.JPG.jpg" style="width: 620px; height: 316px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14109911877829040" jivemacro_uid="_14109911877829040"&gt;
&lt;P&gt;tabData:&lt;/P&gt;
&lt;P&gt;LOAD Ignition,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date#([Date/Hour], 'YYYY-MM-DD hh:mm:ss.fff') as [Date/Hour],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Left(ID_PATH,5) as ID_PATH&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;FROM [&lt;/SPAN&gt;&lt;A _jive_internal="true" data-containerid="-1" data-containertype="-1" data-objectid="127033" data-objecttype="13" href="https://community.qlik.com/servlet/JiveServlet/download/2003-133815-612276-127033/SAMPLE.xlsx"&gt;http://community.qlik.com/servlet/JiveServlet/download/612276-127033/SAMPLE.xlsx&lt;/A&gt;&lt;SPAN&gt;] (ooxml, embedded labels, table is Plan1);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;tabDowntimes:&lt;/P&gt;
&lt;P&gt;LOAD Previous([Date/Hour]) as [Date/Hour],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Interval(EdgeTime-Previous(EdgeTime), 'dd hh:mm:ss') as Downtime&lt;/P&gt;
&lt;P&gt;Where EdgeType='Rising' and ID_PATH=Previous(ID_PATH);&lt;/P&gt;
&lt;P&gt;LOAD ID_PATH,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Date/Hour],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Date/Hour] as EdgeTime,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pick((Ignition-Previous(Ignition))/2+1.5,'Falling','Rising') as EdgeType&lt;/P&gt;
&lt;P&gt;Resident tabData&lt;/P&gt;
&lt;P&gt;Where Ignition-Previous(Ignition)&lt;/P&gt;
&lt;P&gt;Order By ID_PATH, [Date/Hour];&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 21:58:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GPS-Count-the-stop-time/m-p/724116#M1062700</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-09-17T21:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: GPS - Count the stop time</title>
      <link>https://community.qlik.com/t5/QlikView/GPS-Count-the-stop-time/m-p/724117#M1062701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Marco !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems that worked ! I'm gonna test and return to you !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for contribution ! Can you explain to me how are you doing it?&lt;/P&gt;&lt;P&gt;Didnt understand this line:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 1.5em; background-color: #f8f8f8;"&gt;Pick((Ignition-Previous(Ignition))/2+1.5,'Falling','Rising') as EdgeType&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 1.5em; background-color: #f8f8f8;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 1.5em; background-color: #f8f8f8;"&gt;Morandi&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2014 13:27:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GPS-Count-the-stop-time/m-p/724117#M1062701</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-22T13:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: GPS - Count the stop time</title>
      <link>https://community.qlik.com/t5/QlikView/GPS-Count-the-stop-time/m-p/724118#M1062702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A href="https://community.qlik.com/qlik-users/61824"&gt;Marco Wedel&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying now to see the average time of everybody. What i need is to see the time and distance of each ID_PATH.&lt;/P&gt;&lt;P&gt;To this i need the first "event = exit" and last "event = exit". &lt;/P&gt;&lt;P&gt;The time is calculated with &lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;[Date/Hour] and the distance, I have the data on how many KM it started and finished (final KM - KM beginning).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need this in script. Can you help me?&lt;/P&gt;&lt;P&gt;Thanks !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2014 13:53:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GPS-Count-the-stop-time/m-p/724118#M1062702</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-22T13:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: GPS - Count the stop time</title>
      <link>https://community.qlik.com/t5/QlikView/GPS-Count-the-stop-time/m-p/724119#M1062703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it's just a shorter version of&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f8f8f8;"&gt;If(Ignition=1 and Previous(Ignition)=0, 'Rising',&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f8f8f8;"&gt;&amp;nbsp;&amp;nbsp; If(&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f8f8f8;"&gt;Ignition=0 and Previous(Ignition)=1, 'Falling')) as&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f8f8f8;"&gt; EdgeType &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f8f8f8;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f8f8f8;"&gt;regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f8f8f8;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f8f8f8;"&gt;Marco&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2014 14:42:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GPS-Count-the-stop-time/m-p/724119#M1062703</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-09-22T14:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: GPS - Count the stop time</title>
      <link>https://community.qlik.com/t5/QlikView/GPS-Count-the-stop-time/m-p/724120#M1062704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please mark this thread as answered if your initial question is answered and open another thread for this question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2014 14:43:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GPS-Count-the-stop-time/m-p/724120#M1062704</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-09-22T14:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: GPS - Count the stop time</title>
      <link>https://community.qlik.com/t5/QlikView/GPS-Count-the-stop-time/m-p/724121#M1062705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the answer Marco !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, it's a part of same problem. We will loose the context if i create another post. Can we continue here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2014 16:27:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GPS-Count-the-stop-time/m-p/724121#M1062705</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-22T16:27:21Z</dc:date>
    </item>
  </channel>
</rss>

