<?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: Peek function help in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Re-Peek-function-help/m-p/1099833#M462728</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to know how values are coming for value1 while using peek from my table?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 27 Aug 2016 06:43:54 GMT</pubDate>
    <dc:creator>Anil_Babu_Samineni</dc:creator>
    <dc:date>2016-08-27T06:43:54Z</dc:date>
    <item>
      <title>Re: Peek function help</title>
      <link>https://community.qlik.com/t5/QlikView/Re-Peek-function-help/m-p/1099831#M462726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have one small question, Peek(value) returns&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;returns the value of Value in the previous record read ( equivalent to &lt;SPAN class="Bold"&gt;previous(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;value&lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;) &lt;/SPAN&gt;). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's Assume&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Value&lt;/P&gt;&lt;P&gt;A&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; 10&lt;/P&gt;&lt;P&gt;B&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; 20&lt;/P&gt;&lt;P&gt;C&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; 30&lt;/P&gt;&lt;P&gt;D&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; 40&lt;/P&gt;&lt;P&gt;E&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; 50&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we take, Peek(Value) as Value1, Then how result is visible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Values&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;A&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; 10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;B&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; 20&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;C&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; 30&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;D&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; 40&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;E&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; 50&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Aug 2016 02:50:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Re-Peek-function-help/m-p/1099831#M462726</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2016-08-27T02:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: Peek function help</title>
      <link>https://community.qlik.com/t5/QlikView/Re-Peek-function-help/m-p/1099832#M462727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anil, I branched this to a separate thread since it is not a question related directly to the thread where you posted it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not completely understand you question. Can you please provide a sample QVW file where Peek() returns unexpected values?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is incorrect that Peek() and Previous() are equivalent functions. Please review the definitions in help, &lt;A href="http://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/Scripting/InterRecordFunctions/Peek.htm" title="http://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/Scripting/InterRecordFunctions/Peek.htm"&gt;Peek ‒ QlikView&lt;/A&gt;‌ and &lt;A href="http://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/Scripting/InterRecordFunctions/Previous.htm" title="http://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/Scripting/InterRecordFunctions/Previous.htm"&gt;Previous ‒ QlikView&lt;/A&gt;‌, and consider the difference by for example applying the functions on your sample data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14722774881646665 jive_text_macro" jivemacro_uid="_14722774881646665"&gt;
&lt;P style="font-size: 13.3333px;"&gt;LOAD&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; *,&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; Peek(Value) AS PeekValue,&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; Previous(Value) AS PrevValue&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;Inline [Name, Value&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;A, 10&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;B, 20&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;C, 30&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;D, 40&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;E, 50]&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;Where Name &amp;lt;&amp;gt; 'C';&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Aug 2016 05:59:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Re-Peek-function-help/m-p/1099832#M462727</guid>
      <dc:creator>ToniKautto</dc:creator>
      <dc:date>2016-08-27T05:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: Peek function help</title>
      <link>https://community.qlik.com/t5/QlikView/Re-Peek-function-help/m-p/1099833#M462728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to know how values are coming for value1 while using peek from my table?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Aug 2016 06:43:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Re-Peek-function-help/m-p/1099833#M462728</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2016-08-27T06:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: Peek function help</title>
      <link>https://community.qlik.com/t5/QlikView/Re-Peek-function-help/m-p/1099834#M462729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would suggest that you load the example script I added above. Then read the help pages, and reflect on what the example show you. Let me know if a result in that example does not make sense for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have an other example where the result do not turn up as you expected, please attach it so that we can explain why the result look the way they do. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Aug 2016 06:52:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Re-Peek-function-help/m-p/1099834#M462729</guid>
      <dc:creator>ToniKautto</dc:creator>
      <dc:date>2016-08-27T06:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: Peek function help</title>
      <link>https://community.qlik.com/t5/QlikView/Re-Peek-function-help/m-p/1099835#M462730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Toni, First of all thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/135761_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For peek, It takes previous. But, I didn't understand why 30 will come?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Aug 2016 11:27:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Re-Peek-function-help/m-p/1099835#M462730</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2016-08-27T11:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: Peek function help</title>
      <link>https://community.qlik.com/t5/QlikView/Re-Peek-function-help/m-p/1099836#M462731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Previous() operates on the Input to the Load statement, whereas Peek() operates on the Output of the Load statement. That is the reason you are getting 30. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Aug 2016 11:57:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Re-Peek-function-help/m-p/1099836#M462731</guid>
      <dc:creator>trdandamudi</dc:creator>
      <dc:date>2016-08-27T11:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: Peek function help</title>
      <link>https://community.qlik.com/t5/QlikView/Re-Peek-function-help/m-p/1099837#M462732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a significant difference in the way Peek() and Previous() works. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peek() is used to get a value from a in memory table, meaning data that has been processed and stored in the in-memory table. It can fetch the previous row stored, it can fetch data from any cell in any in-memory table. &lt;/P&gt;&lt;P&gt;Previous() is used to get a value from the record provided from the data source.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my example Name C is not loaded into memory. The record is still fetched from the data source. For Name D the previous record is Name C, and its value is 30. The conclusion of this is that you need to chose the correct function depending on what you intention is. Are you looking for a value that has been stored, or are you looking for a value from previous incoming record? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Aug 2016 08:42:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Re-Peek-function-help/m-p/1099837#M462732</guid>
      <dc:creator>ToniKautto</dc:creator>
      <dc:date>2016-08-28T08:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: Peek function help</title>
      <link>https://community.qlik.com/t5/QlikView/Re-Peek-function-help/m-p/1099838#M462733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nie, Cool and cheers explanation. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Aug 2016 08:46:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Re-Peek-function-help/m-p/1099838#M462733</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2016-08-28T08:46:06Z</dc:date>
    </item>
  </channel>
</rss>

