<?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: Generate rows of incrementing dates in load script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Generate-rows-of-incrementing-dates-in-load-script/m-p/627629#M230568</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When it's loading, it works fine if I load just 5 or 6 users, however, loading hundreds of users causes 10 million+ lines to be generated and the load doesn't stop. Might there be something wrong with the joins?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 May 2014 13:57:57 GMT</pubDate>
    <dc:creator>sifatnabil</dc:creator>
    <dc:date>2014-05-09T13:57:57Z</dc:date>
    <item>
      <title>Generate rows of incrementing dates in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-rows-of-incrementing-dates-in-load-script/m-p/627621#M230560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am loading data where each row in the table indicates a login or logout for each user. The table looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;username, action, date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;timothy, login, 1/5/2014&lt;/P&gt;&lt;P&gt;timothy, logout, 4/5/2014&lt;/P&gt;&lt;P&gt;ben, login, 2/5/2014&lt;/P&gt;&lt;P&gt;ben, logout, 8/5/2014&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to generate new rows in this table between a login and logout which will have the missing dates. So the final table in load script should look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;username, action, date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;timothy, login, 1/5/2014&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;timothy, login, 2/5/2014&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;timothy, login, 3/5/2014&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;timothy, logout, 4/5/2014&lt;/P&gt;&lt;P&gt;ben, login, 2/5/2014&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;ben, login, 3/5/2014&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;ben, login, 4/5/2014&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;ben, login, 5/5/2014&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;ben, login, 6/5/2014&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;ben, login, 7/5/2014&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ben, logout, 8/5/2014&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I want to generate the underlined rows using a for or while loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I've attempted so far is to load the original table, and then load a second table like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;upper&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;USER_NAME&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;USER_NAME&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DATE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;-&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;DATE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,-1,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;USLogin&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;datecount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; USLogin&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;While&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IterNo&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;() ? &amp;lt;--getting stuck here&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;But that's where I'm getting stuck. Essentially, &lt;EM&gt;for each username&lt;/EM&gt;, I want to increment the date of a login until it reaches the date of a logout, and generate rows in between a login and logout with these incremented dates.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;How can this be achieved? Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2014 03:08:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-rows-of-incrementing-dates-in-load-script/m-p/627621#M230560</guid>
      <dc:creator>sifatnabil</dc:creator>
      <dc:date>2014-05-09T03:08:06Z</dc:date>
    </item>
    <item>
      <title>Re: Generate rows of incrementing dates in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-rows-of-incrementing-dates-in-load-script/m-p/627622#M230561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;Input:&lt;/P&gt;
&lt;P&gt;Load * Inline [&lt;BR /&gt;username, action, date&lt;/P&gt;
&lt;P&gt;timothy, login, 1/5/2014&lt;/P&gt;
&lt;P&gt;timothy, logout, 4/5/2014&lt;/P&gt;
&lt;P&gt;ben, login, 2/5/2014&lt;/P&gt;
&lt;P&gt;ben, logout, 8/5/2014&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;Join&lt;BR /&gt;Temp:&lt;BR /&gt;Load&lt;BR /&gt; username,&lt;BR /&gt; Max(date) as MaxDate &lt;BR /&gt;Resident Input Group By username;&lt;/P&gt;
&lt;P&gt;Final:&lt;BR /&gt;Load&lt;BR /&gt; username,&lt;BR /&gt; If(date+IterNo()-1=MaxDate, action, 'Login') as action,&lt;BR /&gt; date(date+IterNo()-1) as date&lt;BR /&gt; &lt;BR /&gt;Resident Input while date+IterNo()-1&amp;lt;=MaxDate &lt;STRONG&gt;and action &amp;lt;&amp;gt;'logout&lt;/STRONG&gt;';&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // corrected&lt;/P&gt;
&lt;P&gt;Drop table Input;&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2014 04:40:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-rows-of-incrementing-dates-in-load-script/m-p/627622#M230561</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-05-09T04:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: Generate rows of incrementing dates in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-rows-of-incrementing-dates-in-load-script/m-p/627623#M230562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Small correction to Tresesco's code which generates extra row on max date with login as action&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Input:&lt;/P&gt;&lt;P&gt;Load * Inline [&lt;/P&gt;&lt;P&gt;username, action, date&lt;/P&gt;&lt;P&gt;timothy, login, 1/5/2014&lt;/P&gt;&lt;P&gt;timothy, logout, 4/5/2014&lt;/P&gt;&lt;P&gt;ben, login, 2/5/2014&lt;/P&gt;&lt;P&gt;ben, logout, 8/5/2014&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;Join&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;username,&lt;/P&gt;&lt;P&gt;Max(date) as MaxDate &lt;/P&gt;&lt;P&gt;Resident Input Group By username;&lt;/P&gt;&lt;P&gt;Final:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;username,&lt;/P&gt;&lt;P&gt;If(date+IterNo()-1=MaxDate, action, 'Login') as action,&lt;/P&gt;&lt;P&gt;date(date+IterNo()-1) as date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Input while date+IterNo()-1&amp;lt;MaxDate Or (IterNo() = 1 And date=MaxDate);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Drop table Input;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2014 05:24:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-rows-of-incrementing-dates-in-load-script/m-p/627623#M230562</guid>
      <dc:creator>anbu1984</dc:creator>
      <dc:date>2014-05-09T05:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: Generate rows of incrementing dates in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-rows-of-incrementing-dates-in-load-script/m-p/627624#M230563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good catch anbu. The easier correction(as I did) would be :&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;and action &amp;lt;&amp;gt;'logout&lt;/STRONG&gt;'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; to avoid the max date load from resident table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2014 06:07:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-rows-of-incrementing-dates-in-load-script/m-p/627624#M230563</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-05-09T06:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Generate rows of incrementing dates in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-rows-of-incrementing-dates-in-load-script/m-p/627625#M230564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Did you try to add several intervals?&lt;/P&gt;&lt;P&gt;For example&lt;/P&gt;&lt;P&gt;timothy, login, 3/4/2014&lt;/P&gt;&lt;P&gt;timothy, logout, 4/4/2014&lt;/P&gt;&lt;P&gt;ben, login, 2/4/2014&lt;/P&gt;&lt;P&gt;ben, logout, 8/4/2014&lt;/P&gt;&lt;P&gt;timothy, login, 1/5/2014&lt;/P&gt;&lt;P&gt;timothy, logout, 4/5/2014&lt;/P&gt;&lt;P&gt;ben, login, 2/5/2014&lt;/P&gt;&lt;P&gt;ben, logout, 8/5/2014&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I see &lt;STRONG&gt;MaxDate &lt;/STRONG&gt;will not work.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;So. I tried to solve this situation with intervalmatch.&lt;/P&gt;&lt;P&gt;PFA&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2014 08:29:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-rows-of-incrementing-dates-in-load-script/m-p/627625#M230564</guid>
      <dc:creator>SergeyMak</dc:creator>
      <dc:date>2014-05-09T08:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: Generate rows of incrementing dates in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-rows-of-incrementing-dates-in-load-script/m-p/627626#M230565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sergey, You attached the wrong app&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2014 08:47:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-rows-of-incrementing-dates-in-load-script/m-p/627626#M230565</guid>
      <dc:creator>anbu1984</dc:creator>
      <dc:date>2014-05-09T08:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Generate rows of incrementing dates in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-rows-of-incrementing-dates-in-load-script/m-p/627627#M230566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PFA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2014 08:48:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-rows-of-incrementing-dates-in-load-script/m-p/627627#M230566</guid>
      <dc:creator>SergeyMak</dc:creator>
      <dc:date>2014-05-09T08:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: Generate rows of incrementing dates in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-rows-of-incrementing-dates-in-load-script/m-p/627628#M230567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sergey, many thanks for your program. This is almost working - however, it's generating rows for the days that each user is &lt;EM&gt;not&lt;/EM&gt; logged in, which is undesirable because the data has 1000+ users. How would you modify it such that it only generates rows for when the user is logged in? Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2014 13:11:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-rows-of-incrementing-dates-in-load-script/m-p/627628#M230567</guid>
      <dc:creator>sifatnabil</dc:creator>
      <dc:date>2014-05-09T13:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Generate rows of incrementing dates in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-rows-of-incrementing-dates-in-load-script/m-p/627629#M230568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When it's loading, it works fine if I load just 5 or 6 users, however, loading hundreds of users causes 10 million+ lines to be generated and the load doesn't stop. Might there be something wrong with the joins?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2014 13:57:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-rows-of-incrementing-dates-in-load-script/m-p/627629#M230568</guid>
      <dc:creator>sifatnabil</dc:creator>
      <dc:date>2014-05-09T13:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Generate rows of incrementing dates in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-rows-of-incrementing-dates-in-load-script/m-p/627630#M230569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I modified the script&lt;/P&gt;&lt;P&gt;Now only login actions are repeating.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PFA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sergey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2014 00:53:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-rows-of-incrementing-dates-in-load-script/m-p/627630#M230569</guid>
      <dc:creator>SergeyMak</dc:creator>
      <dc:date>2014-05-12T00:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Generate rows of incrementing dates in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-rows-of-incrementing-dates-in-load-script/m-p/627631#M230570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2014 04:40:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-rows-of-incrementing-dates-in-load-script/m-p/627631#M230570</guid>
      <dc:creator>sifatnabil</dc:creator>
      <dc:date>2014-05-13T04:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: Generate rows of incrementing dates in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-rows-of-incrementing-dates-in-load-script/m-p/627632#M230571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sergey, could this be modified such that if a logout date for a user does not exist, (i.e. they haven't logged out yet), it populates the dates to today's date?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g. if the raw data is&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;username, action, date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;timothy, login, 12/6/2014&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output should be populated to current date (16th June):&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;username, action, date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;timothy, login, 12/6/2014&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;timothy, login, 13/6/2014&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;timothy, login, 14/6/2014&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;timothy, login, 15/6/2014&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;timothy, login, 16/6/2014&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently, if a logout date does not exist for a user, it just shows the login date. I tried editing the script to change the "DateTo" field like below, but it didn't work: &lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;//LEFT JOIN (Data)//&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;tmp1Data:&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;User&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;amp;'|'&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Previous&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;OR&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;isNull&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Previous&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Previous&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;%KEY&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;//AS Date,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Previous&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;OR&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;isNull&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Previous&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Previous&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DateFrom&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Action&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;='logout',&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;today&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;()) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DateTo&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Data&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;WHERE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Previous&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;OR&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;isNull&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Previous&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Previous&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Action&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;='logout'&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2014 03:14:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-rows-of-incrementing-dates-in-load-script/m-p/627632#M230571</guid>
      <dc:creator>sifatnabil</dc:creator>
      <dc:date>2014-06-16T03:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Generate rows of incrementing dates in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-rows-of-incrementing-dates-in-load-script/m-p/627633#M230572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sifat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just add these lines after INLINE statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tmp5Data:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;User,&lt;/P&gt;&lt;P&gt;Max(Date) AS MaxDate&lt;/P&gt;&lt;P&gt;Resident tmpData&lt;/P&gt;&lt;P&gt;Group by User;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEFT Join (tmpData)&lt;/P&gt;&lt;P&gt;LOAD User,&lt;/P&gt;&lt;P&gt;MaxDate AS Date,&lt;/P&gt;&lt;P&gt;1 AS LastAction&lt;/P&gt;&lt;P&gt;Resident tmp5Data;&lt;/P&gt;&lt;P&gt;DROP Table tmp5Data;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate (tmpData)&lt;/P&gt;&lt;P&gt;LOAD User,&lt;/P&gt;&lt;P&gt;'logout' AS Action,&lt;/P&gt;&lt;P&gt;Date(Today()) AS Date&lt;/P&gt;&lt;P&gt;Resident tmpData&lt;/P&gt;&lt;P&gt;WHERE Action='login' AND LastAction=1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PFA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2014 08:12:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-rows-of-incrementing-dates-in-load-script/m-p/627633#M230572</guid>
      <dc:creator>SergeyMak</dc:creator>
      <dc:date>2014-06-16T08:12:11Z</dc:date>
    </item>
  </channel>
</rss>

