<?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: Create session ID from data with timestamp in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912344#M316601</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How does you script look like? If you renamed Session to SessionID, you also need to rename the fields in the Peek() function...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take care that the timestamp format code matches the format of timestamps of your input file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you run my exact script, using your sample data, it should show Session ids on all lines, don't you see?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Jul 2015 13:57:20 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2015-07-23T13:57:20Z</dc:date>
    <item>
      <title>Create session ID from data with timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912339#M316596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm working with the server Audit data, which shows user activity in my QV dashboards. Each action has its own row and a timestamp. It looks something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 348px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="123"&gt;Timestamp&lt;/TD&gt;&lt;TD width="88"&gt;Document&lt;/TD&gt;&lt;TD width="73"&gt;User&lt;/TD&gt;&lt;TD width="64"&gt;Message&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;7/15/2015 11.19:52&lt;/TD&gt;&lt;TD&gt;Analysis.qvw&lt;/TD&gt;&lt;TD&gt;John&lt;/TD&gt;&lt;TD&gt;Selected XYZ&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;7/15/2015 11.21:46&lt;/TD&gt;&lt;TD&gt;Analysis.qvw&lt;/TD&gt;&lt;TD&gt;John&lt;/TD&gt;&lt;TD&gt;Activated Sheet&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;7/15/2015 11.21:52&lt;/TD&gt;&lt;TD&gt;Analysis.qvw&lt;/TD&gt;&lt;TD&gt;John&lt;/TD&gt;&lt;TD&gt;Selected ABC&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;7/15/2015 11.22:13&lt;/TD&gt;&lt;TD&gt;Budget.qvw&lt;/TD&gt;&lt;TD&gt;John&lt;/TD&gt;&lt;TD&gt;Export to Excel&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;7/15/2015 11.22:30&lt;/TD&gt;&lt;TD&gt;Budget.qvw&lt;/TD&gt;&lt;TD&gt;John&lt;/TD&gt;&lt;TD&gt;asdasd&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;7/15/2015 11.22:14&lt;/TD&gt;&lt;TD&gt;Analysis.qvw&lt;/TD&gt;&lt;TD&gt;Mary&lt;/TD&gt;&lt;TD&gt;yj&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;7/15/2015 11.22:25&lt;/TD&gt;&lt;TD&gt;Analysis.qvw&lt;/TD&gt;&lt;TD&gt;Mary&lt;/TD&gt;&lt;TD&gt;ty&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;7/15/2015 1.15:05&lt;/TD&gt;&lt;TD&gt;Analysis.qvw&lt;/TD&gt;&lt;TD&gt;John&lt;/TD&gt;&lt;TD&gt;adfh&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;7/15/2015 1.17:10&lt;/TD&gt;&lt;TD&gt;Analysis.qvw&lt;/TD&gt;&lt;TD&gt;John&lt;/TD&gt;&lt;TD&gt;adfaer&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the script, I want to use Timestamp and User to create a Session ID. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So John from 11.19:52 - 11.22:30 would be Session ID 1, (ignore him switching dashboards during session)&lt;/P&gt;&lt;P&gt;Mary is 11.22:14-11.22:25, 2&lt;/P&gt;&lt;P&gt;and then when John comes back later from 1.15:05-1.17:10 would be Session 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this can be done with a condition that says after 10 minutes from last user timestamp, it counts as a new session, so create a new session ID. But I don't know how to write this. Can anyone help me?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 13:09:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912339#M316596</guid>
      <dc:creator />
      <dc:date>2015-07-23T13:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: Create session ID from data with timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912340#M316597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14376576415477346 jive_text_macro" jivemacro_uid="_14376576415477346"&gt;
&lt;P&gt;Set TimestampFormat = 'M/DD/YYYY hh.mm:ss';&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;INPUT:&lt;/P&gt;
&lt;P&gt;LOAD Timestamp,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Document,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; User,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Message&lt;/P&gt;
&lt;P&gt;FROM&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;A class="jive-link-thread-small" data-containerid="2051" data-containertype="14" data-objectid="173771" data-objecttype="1" href="https://community.qlik.com/thread/173771"&gt;https://community.qlik.com/thread/173771&lt;/A&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;(html, codepage is 1252, embedded labels, table is @1);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;RESULT:&lt;/P&gt;
&lt;P&gt;LOAD *, if(peek(User) &amp;lt;&amp;gt; User or peek(Timestamp)-Timestamp &amp;gt; interval#('10','m'), rangesum(1, Peek(Session)), Peek(Session) ) as Session&lt;/P&gt;
&lt;P&gt;RESIDENT INPUT&lt;/P&gt;
&lt;P&gt;ORDER BY User, Timestamp desc;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP TABLE INPUT;&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 13:20:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912340#M316597</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-07-23T13:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: Create session ID from data with timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912341#M316598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe this way worked or showed at least the direction:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Audit:&lt;/P&gt;&lt;P&gt;Load Timestamp, Document, User, Message From xyz;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; left join&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Timestamp, User, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; autonumber(min(Timestamp) &amp;amp; ' - ' &amp;amp; max(Timestamp) &amp;amp; ' - ' User) as SessionID &lt;/P&gt;&lt;P&gt;Resident Audit Group by Timestamp, User;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 13:22:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912341#M316598</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-07-23T13:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: Create session ID from data with timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912342#M316599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm Swuehl this looked great but unfortunately gave me something like the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="895"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" width="62"&gt;SessionID&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="120"&gt;Timestamp&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="30"&gt;User&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="683"&gt;Message&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;7/15/2015 11.19:52&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;John&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;Selected XYZ&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;7/15/2015 11.21:46&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;John&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;Activated Sheet&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;7/15/2015 11.21:52&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;John&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;Selected ABC&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;7/15/2015 11.22:13&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;John&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;Export to Excel&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;7/15/2015 11.22:30&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;John&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;asdasd&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;7/15/2015 11.22:14&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;Mary&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;yj&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;7/15/2015 11.22:25&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;Mary&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;ty&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;7/15/2015 1.15:05&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;John&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;adfh&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;7/15/2015 1.15:10&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;John&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;adfaer&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 13:46:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912342#M316599</guid>
      <dc:creator />
      <dc:date>2015-07-23T13:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: Create session ID from data with timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912343#M316600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem with this method is that it does not take into account that I want a new SessionID if more than 10 minutes interval from last user timestamp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 13:48:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912343#M316600</guid>
      <dc:creator />
      <dc:date>2015-07-23T13:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: Create session ID from data with timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912344#M316601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How does you script look like? If you renamed Session to SessionID, you also need to rename the fields in the Peek() function...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take care that the timestamp format code matches the format of timestamps of your input file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you run my exact script, using your sample data, it should show Session ids on all lines, don't you see?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 13:57:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912344#M316601</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-07-23T13:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: Create session ID from data with timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912345#M316602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe you could include something like the following to get the interval:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;num(class(Timestamp, 1 / 24 / 6)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 13:58:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912345#M316602</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-07-23T13:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Create session ID from data with timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912346#M316603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I changed TimestampFormat to input and made sure everything is Session. Now I get ID on every row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, the 10 minute interval rule does not seem to be working:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="240" style="height: 107px; width: 487px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" width="62"&gt;Session&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="120"&gt;Timestamp&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="30"&gt;User&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="106"&gt;Message&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;7/15/2015 11.19:52&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;John&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;Selected XYZ&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;7/15/2015 11.21:46&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;John&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;Activated Sheet&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;7/15/2015 11.21:52&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;John&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;Selected ABC&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;7/15/2015 11.22:13&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;John&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;Export to Excel&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;7/15/2015 11.22:30&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;John&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;asdasd&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;7/15/2015 11.22:14&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;Mary&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;yj&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;7/15/2015 11.22:25&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;Mary&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;ty&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;7/15/2015 1.15:05&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;John&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;adfh&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;7/15/2015 1.15:10&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;John&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;adfaer&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The last two rows should have ID 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I copied your script for it:&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(peek(User)&amp;lt;&amp;gt; User or peek(Timestamp)-Timestamp &amp;gt; interval#('10','m'), rangesum(1, Peek(Session)), Peek(Session) ) as Session,&lt;/P&gt;&lt;P&gt;Timestamp,&lt;/P&gt;&lt;P&gt;..."&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 14:03:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912346#M316603</guid>
      <dc:creator />
      <dc:date>2015-07-23T14:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: Create session ID from data with timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912347#M316604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe your timestamp format is not parsed in correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is your input (default) format set in the script or OS?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 14:16:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912347#M316604</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-07-23T14:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: Create session ID from data with timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912348#M316605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you are right, I am messing up format somewhere.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, my input is a text file. To prevent confusion, I am posting a sample QVW, with real data that I need to use. I just cleaned some sensitive material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I have fixed all the formats, but I am still not getting the correct use of interval#.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance for looking at this!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 14:41:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912348#M316605</guid>
      <dc:creator />
      <dc:date>2015-07-23T14:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Create session ID from data with timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912349#M316606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Timestamp format is OK, but it's&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ORDER BY &lt;STRONG&gt;User, Timestamp desc;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit:&lt;/P&gt;&lt;P&gt;Attached the sample, now also with a resorted SessionID.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 14:45:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912349#M316606</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-07-23T14:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: Create session ID from data with timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912350#M316607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is SO COOL! Thank you Swuehl!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 15:05:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912350#M316607</guid>
      <dc:creator />
      <dc:date>2015-07-23T15:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: Create session ID from data with timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912351#M316608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've posted a new but related question here, if you are interested: &lt;A href="https://community.qlik.com/message/829257"&gt;Difference between timestamps, within sessions&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 15:26:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912351#M316608</guid>
      <dc:creator />
      <dc:date>2015-07-23T15:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: Create session ID from data with timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912352#M316609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help Marcus. I did not know about the Class function, I will keep it in mind for other problems &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 15:26:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912352#M316609</guid>
      <dc:creator />
      <dc:date>2015-07-23T15:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: Create session ID from data with timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912353#M316610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Swuehl&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;rangesum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(1, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Session&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)), &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; could you please&amp;nbsp; explain us what it&amp;nbsp; will do.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;here 1 means all? or from the top of the row?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 07:28:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912353#M316610</guid>
      <dc:creator />
      <dc:date>2015-07-28T07:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: Create session ID from data with timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912354#M316611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="syntax"&gt;&lt;A name="kanchor975"&gt;&lt;/A&gt;&lt;A name="rangesum"&gt;&lt;/A&gt;&lt;SPAN class="Bold"&gt;&lt;EM&gt;rangesum(&lt;/EM&gt;&lt;/SPAN&gt;&lt;EM&gt;&lt;SPAN class="Italic"&gt;expr1 [ , expr2, ... exprN ]&lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P class="syntax"&gt;&lt;/P&gt;&lt;P&gt;Returns the sum of a range of 1 to N arguments. As opposed to the &lt;SPAN style="font-size: 11pt; font-weight: bold;"&gt;+&lt;/SPAN&gt; operator, &lt;SPAN class="Bold"&gt;rangesum&lt;/SPAN&gt; will treat all non-numeric values as 0. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="example"&gt;Examples:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;rangesum (1,2,4)&lt;/SPAN&gt; returns 7&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;rangesum (1,'xyz')&lt;/SPAN&gt; returns 1&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;rangesum (null( ))&lt;/SPAN&gt; returns 0&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 19:32:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-session-ID-from-data-with-timestamp/m-p/912354#M316611</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-07-28T19:32:45Z</dc:date>
    </item>
  </channel>
</rss>

