<?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: Look at the previous value and next value of the row in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Look-at-the-previous-value-and-next-value-of-the-row/m-p/1694262#M634124</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had the issue with log ordered by date (I wanted to compare the timestamp to the next). I find a simple solution was to order the table by Date desc;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fait :&lt;BR /&gt;NoConcatenate&lt;BR /&gt;Load&lt;BR /&gt;Flg_TP,&lt;/P&gt;&lt;P&gt;id_objet,&lt;BR /&gt;if(Previous(id_objet)=id_objet, Previous(Date_et_heure)-Date_et_heure,0) as Duration,&lt;BR /&gt;Date_et_heure&lt;BR /&gt;Resident Fait_tmp order by id_objet,Date_et_heure desc;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Apr 2020 21:18:26 GMT</pubDate>
    <dc:creator>Charles_Alter-SI</dc:creator>
    <dc:date>2020-04-16T21:18:26Z</dc:date>
    <item>
      <title>Look at the previous value and next value of the row</title>
      <link>https://community.qlik.com/t5/QlikView/Look-at-the-previous-value-and-next-value-of-the-row/m-p/1125173#M634118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently working on a problem in which I want to look at the previous value of the row and which I can achieve by using Peek function. How can I look at the next value at the same time?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to be able to look at both at the same time. Please let me know if you need any more information. Greatly appreciate your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Parth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2016 15:45:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Look-at-the-previous-value-and-next-value-of-the-row/m-p/1125173#M634118</guid>
      <dc:creator />
      <dc:date>2016-05-11T15:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: Look at the previous value and next value of the row</title>
      <link>https://community.qlik.com/t5/QlikView/Look-at-the-previous-value-and-next-value-of-the-row/m-p/1125174#M634119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Path, &lt;/P&gt;&lt;P&gt;you can achieve this using the Peek function using its parameters like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;&lt;SPAN style="color: #ffffff; background-color: #3399ff;"&gt;peek&lt;/SPAN&gt;( 'Sales',-1 )&lt;/SPAN&gt;&amp;nbsp; - returns the value of &lt;SPAN class="Italic"&gt;Sales&lt;/SPAN&gt; in the previous record read ( equivalent to &lt;SPAN class="Bold"&gt;previous(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;Sales&lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;) &lt;/SPAN&gt;). &lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;&lt;SPAN style="color: #ffffff; background-color: #3399ff;"&gt;peek&lt;/SPAN&gt;( 'Sales', 1 ) - &lt;/SPAN&gt;returns the value of &lt;SPAN class="Italic"&gt;Sales&lt;/SPAN&gt; from the second record read from the current internal table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2016 15:53:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Look-at-the-previous-value-and-next-value-of-the-row/m-p/1125174#M634119</guid>
      <dc:creator>santiago_respane</dc:creator>
      <dc:date>2016-05-11T15:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: Look at the previous value and next value of the row</title>
      <link>https://community.qlik.com/t5/QlikView/Look-at-the-previous-value-and-next-value-of-the-row/m-p/1125175#M634120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Santiago,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I m confused now. Would you please verify my two statements below?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I am at row 1000,&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Peek('Sales',-1) --&amp;gt; does it look at row 999?&lt;/LI&gt;&lt;LI&gt;Peek('Sales',1) --&amp;gt; does it look at row 1001?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Parth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2016 15:59:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Look-at-the-previous-value-and-next-value-of-the-row/m-p/1125175#M634120</guid>
      <dc:creator />
      <dc:date>2016-05-11T15:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: Look at the previous value and next value of the row</title>
      <link>https://community.qlik.com/t5/QlikView/Look-at-the-previous-value-and-next-value-of-the-row/m-p/1125176#M634121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Parth,&lt;/P&gt;&lt;P&gt;For 2nd Point,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13px; font-family: 'Droid Sans', Arial, Helvetica, 'Nimbus Sans L', sans-serif; color: #505050;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;The data for the Peek() function is loaded from the &lt;SPAN style="color: #ff0000;"&gt;previously loaded table&lt;/SPAN&gt; in the associative QlikView database.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13px; font-family: 'Droid Sans', Arial, Helvetica, 'Nimbus Sans L', sans-serif; color: #505050;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13px; font-family: 'Droid Sans', Arial, Helvetica, 'Nimbus Sans L', sans-serif; color: #505050;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;A href="https://community.qlik.com/docs/DOC-9314"&gt;Peek() or Previous() ?&lt;/A&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2016 16:24:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Look-at-the-previous-value-and-next-value-of-the-row/m-p/1125176#M634121</guid>
      <dc:creator>settu_periasamy</dc:creator>
      <dc:date>2016-05-11T16:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: Look at the previous value and next value of the row</title>
      <link>https://community.qlik.com/t5/QlikView/Look-at-the-previous-value-and-next-value-of-the-row/m-p/1125177#M634122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes your assumption is right.&lt;/P&gt;&lt;P&gt;Both will be working on top of loaded tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2016 16:29:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Look-at-the-previous-value-and-next-value-of-the-row/m-p/1125177#M634122</guid>
      <dc:creator>krishnacbe</dc:creator>
      <dc:date>2016-05-11T16:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Look at the previous value and next value of the row</title>
      <link>https://community.qlik.com/t5/QlikView/Look-at-the-previous-value-and-next-value-of-the-row/m-p/1125178#M634123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here you have an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLE_AUX:&lt;/P&gt;&lt;P&gt;load * inline [&lt;/P&gt;&lt;P&gt;&amp;nbsp; a,b&lt;/P&gt;&lt;P&gt;&amp;nbsp; r,1&lt;/P&gt;&lt;P&gt;&amp;nbsp; s,2&lt;/P&gt;&lt;P&gt;&amp;nbsp; t,3&lt;/P&gt;&lt;P&gt;&amp;nbsp; u,4&lt;/P&gt;&lt;P&gt;&amp;nbsp; x,5&lt;/P&gt;&lt;P&gt;&amp;nbsp; y,6&lt;/P&gt;&lt;P&gt;&amp;nbsp; z,7&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLE_FINAL:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; a,&amp;nbsp; b,&lt;/P&gt;&lt;P&gt;&amp;nbsp; PREVIOUS(b) as PREV,&lt;/P&gt;&lt;P&gt;&amp;nbsp; PEEK('b',RowNo(),'TABLE_AUX') as NEXT&lt;/P&gt;&lt;P&gt;RESIDENT TABLE_AUX;&lt;/P&gt;&lt;P&gt;DROP TABLE TABLE_AUX;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please tell if this suits your needs.&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2016 17:41:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Look-at-the-previous-value-and-next-value-of-the-row/m-p/1125178#M634123</guid>
      <dc:creator>santiago_respane</dc:creator>
      <dc:date>2016-05-11T17:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: Look at the previous value and next value of the row</title>
      <link>https://community.qlik.com/t5/QlikView/Look-at-the-previous-value-and-next-value-of-the-row/m-p/1694262#M634124</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had the issue with log ordered by date (I wanted to compare the timestamp to the next). I find a simple solution was to order the table by Date desc;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fait :&lt;BR /&gt;NoConcatenate&lt;BR /&gt;Load&lt;BR /&gt;Flg_TP,&lt;/P&gt;&lt;P&gt;id_objet,&lt;BR /&gt;if(Previous(id_objet)=id_objet, Previous(Date_et_heure)-Date_et_heure,0) as Duration,&lt;BR /&gt;Date_et_heure&lt;BR /&gt;Resident Fait_tmp order by id_objet,Date_et_heure desc;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2020 21:18:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Look-at-the-previous-value-and-next-value-of-the-row/m-p/1694262#M634124</guid>
      <dc:creator>Charles_Alter-SI</dc:creator>
      <dc:date>2020-04-16T21:18:26Z</dc:date>
    </item>
  </channel>
</rss>

