<?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: difference between peek() and previous() in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/difference-between-peek-and-previous/m-p/518621#M193671</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;Please refer this link, it gives sample to understand&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/04/08/peek-vs-previous-when-to-use-each"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2013/04/08/peek-vs-previous-when-to-use-each&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/121574#121574"&gt;http://community.qlik.com/message/121574#121574&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Nov 2013 14:11:22 GMT</pubDate>
    <dc:creator>MayilVahanan</dc:creator>
    <dc:date>2013-11-13T14:11:22Z</dc:date>
    <item>
      <title>difference between peek() and previous()</title>
      <link>https://community.qlik.com/t5/QlikView/difference-between-peek-and-previous/m-p/518619#M193669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would someone clarify the distinction between the 2 functions?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Nov 2013 14:04:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/difference-between-peek-and-previous/m-p/518619#M193669</guid>
      <dc:creator />
      <dc:date>2013-11-13T14:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: difference between peek() and previous()</title>
      <link>https://community.qlik.com/t5/QlikView/difference-between-peek-and-previous/m-p/518620#M193670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Chris&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The QlikView Help is always good place to find such answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="syntax" style="padding-left: 30px;"&gt;&lt;A name="kanchor47"&gt;&lt;/A&gt;&lt;A name="previous"&gt;&lt;/A&gt;&lt;SPAN class="Bold"&gt;p&lt;EM&gt;revious(&lt;/EM&gt;&lt;/SPAN&gt;&lt;EM&gt;&lt;SPAN class="Italic"&gt;expression &lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;Returns the value of &lt;SPAN class="Italic"&gt;expression&lt;/SPAN&gt; using data from the previous input record. In the first record of an internal table the function will return NULL. The &lt;SPAN class="Bold"&gt;previous&lt;/SPAN&gt; function may be nested in order to access records further back. Data are fetched directly from the input source, making it possible to refer also to fields which have not been loaded into QlikView, i.e. even if they have not been stored in its associative database. &lt;/EM&gt;&lt;/P&gt;&lt;P class="example" style="padding-left: 30px;"&gt;&lt;EM&gt;Examples:&lt;/EM&gt;&lt;/P&gt;&lt;P class="Code" style="padding-left: 30px;"&gt;&lt;EM&gt;Load *, Sales / previous(Sales) as Increase from ...;&lt;/EM&gt;&lt;/P&gt;&lt;P class="Code" style="padding-left: 30px;"&gt;&lt;EM&gt;Load A, previous(previous( A )) as B from ...;&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P class="syntax" style="padding-left: 30px;"&gt;&lt;EM&gt;&lt;A name="kanchor48"&gt;&lt;/A&gt;&lt;A name="peek"&gt;&lt;/A&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN style="background-color: #3399ff; color: #ffffff;"&gt;peek&lt;/SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;fieldname [ , row [ , tablename ] ] &lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;Returns the contents of the &lt;SPAN class="Italic"&gt;fieldname&lt;/SPAN&gt; in the record specified by &lt;SPAN class="Italic"&gt;row&lt;/SPAN&gt; in the internal table &lt;SPAN class="Italic"&gt;tablename&lt;/SPAN&gt;. Data are fetched from the associative QlikView database. &lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&lt;SPAN class="Italic"&gt;Fieldname&lt;/SPAN&gt; must be given as a string (e.g. a quoted literal). &lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&lt;SPAN class="Italic"&gt;Row&lt;/SPAN&gt; must be an integer. 0 denotes the first record, 1 the second and so on. Negative numbers indicate order from the end of the table. -1 denotes the last record read. &lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;If no &lt;SPAN class="Italic"&gt;row&lt;/SPAN&gt; is stated, -1 is assumed. &lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&lt;SPAN class="Italic"&gt;Tablename&lt;/SPAN&gt; is a table label, see &lt;A class="MCXref_0"&gt;Table Labels&lt;/A&gt;, without the ending colon. If no &lt;SPAN class="Italic"&gt;tablename&lt;/SPAN&gt; is stated, the current table is assumed. If used outside the load statement or referring to another table, the tablename must be included. &lt;/EM&gt;&lt;/P&gt;&lt;P class="example" style="padding-left: 30px;"&gt;&lt;EM&gt;Examples:&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&lt;SPAN class="Code"&gt;&lt;SPAN style="background-color: #3399ff; color: #ffffff;"&gt;peek&lt;/SPAN&gt;( 'Sales' )&lt;/SPAN&gt; &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;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;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&lt;SPAN class="Code"&gt;&lt;SPAN style="background-color: #3399ff; color: #ffffff;"&gt;peek&lt;/SPAN&gt;( 'Sales', 2 )&lt;/SPAN&gt; &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;returns the value of &lt;SPAN class="Italic"&gt;Sales&lt;/SPAN&gt; from the third record read from the current internal table. &lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&lt;SPAN class="Code"&gt;&lt;SPAN style="background-color: #3399ff; color: #ffffff;"&gt;peek&lt;/SPAN&gt;( 'Sales', -2 )&lt;/SPAN&gt; &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;returns the value of &lt;SPAN class="Italic"&gt;Sales&lt;/SPAN&gt; from the second last record read into the current internal table. &lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&lt;SPAN class="Code"&gt;&lt;SPAN style="background-color: #3399ff; color: #ffffff;"&gt;peek&lt;/SPAN&gt;( 'Sales', 0, 'Tab1' )&lt;/SPAN&gt; &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;returns the value of &lt;SPAN class="Italic"&gt;Sales&lt;/SPAN&gt; from the first record read into the input table labeled Tab1. &lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&lt;SPAN class="Code"&gt;Load A, B, numsum( B, &lt;SPAN style="background-color: #3399ff; color: #ffffff;"&gt;peek&lt;/SPAN&gt;( 'Bsum' ) ) as Bsum...;&lt;/SPAN&gt; &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;creates an accumulation of B in Bsum. &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Bill&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Nov 2013 14:06:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/difference-between-peek-and-previous/m-p/518620#M193670</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-11-13T14:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: difference between peek() and previous()</title>
      <link>https://community.qlik.com/t5/QlikView/difference-between-peek-and-previous/m-p/518621#M193671</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;Please refer this link, it gives sample to understand&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/04/08/peek-vs-previous-when-to-use-each"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2013/04/08/peek-vs-previous-when-to-use-each&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/121574#121574"&gt;http://community.qlik.com/message/121574#121574&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Nov 2013 14:11:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/difference-between-peek-and-previous/m-p/518621#M193671</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2013-11-13T14:11:22Z</dc:date>
    </item>
  </channel>
</rss>

