<?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: Why Peek() don't work with Preceding Load? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Why-Peek-don-t-work-with-Preceding-Load/m-p/1654790#M593609</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/77179"&gt;@Mattia&lt;/a&gt;&amp;nbsp;Hi, it seems the post your linking to has been deleted, please provide the needed details. Thank you&lt;/P&gt;</description>
    <pubDate>Thu, 05 Dec 2019 21:45:47 GMT</pubDate>
    <dc:creator>Sue_Macaluso</dc:creator>
    <dc:date>2019-12-05T21:45:47Z</dc:date>
    <item>
      <title>Why Peek() don't work with Preceding Load?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-Peek-don-t-work-with-Preceding-Load/m-p/1650132#M593605</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;i'm in trouble because i notice that Peek() don't work with Preceding load and i don't know why.&lt;/P&gt;&lt;P&gt;Load&lt;BR /&gt;If(COUNT=Peek(COUNT),Peek(PROG)+1,1) as PROG,&lt;BR /&gt;*&lt;BR /&gt;Where Len(Trim(CODE))&amp;gt;0;&lt;/P&gt;&lt;P&gt;The output i want is the following: for every COUNT a numerical sequence (PROG) if the CODE&amp;gt;0.&lt;/P&gt;&lt;P&gt;Now, all the PROG=1.&lt;/P&gt;&lt;P&gt;What's my mistake?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mattia&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 01:52:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-Peek-don-t-work-with-Preceding-Load/m-p/1650132#M593605</guid>
      <dc:creator>Mattia</dc:creator>
      <dc:date>2024-11-16T01:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: Why Peek() don't work with Preceding Load?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-Peek-don-t-work-with-Preceding-Load/m-p/1650154#M593606</link>
      <description>&lt;P&gt;Hi Mattia,&lt;/P&gt;&lt;P&gt;I didn't understand your question very well, maybe with an example I can understand it well.&lt;/P&gt;&lt;P&gt;otherwise Peek() in Qlik: finds the value of a field in a table for a row that has already been loaded or that exists in internal memory.&lt;/P&gt;&lt;P&gt;while in your function you use If(COUNT=Peek(COUNT),Peek(PROG)+1,1) as PROG&lt;/P&gt;&lt;P&gt;so you test on a value that is not yet loaded in memory "COUNT=Peek(COUNT)".&lt;/P&gt;&lt;P&gt;think about using "Resident".&lt;/P&gt;&lt;P&gt;I hope this will help you.&lt;/P&gt;&lt;P&gt;Taoufiq&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2019 14:20:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-Peek-don-t-work-with-Preceding-Load/m-p/1650154#M593606</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2019-11-22T14:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: Why Peek() don't work with Preceding Load?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-Peek-don-t-work-with-Preceding-Load/m-p/1650157#M593607</link>
      <description>&lt;P&gt;Hi Mattia,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What you've written down is a code that identifies if the previous row is the same number.&lt;/P&gt;&lt;P&gt;For this to work properly, you may want to order your data by the column [&lt;SPAN&gt;COUNT] like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;(script below is plug-and-play)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TestData:
Load * INLINE [
COUNT
101
102
103
103
104
105
105
105
106
];


Transformed:
NoConcatenate
Load
If(COUNT=Peek(COUNT), Peek(PROG)+1,1) as PROG,
COUNT
Resident TestData
ORDER BY COUNT ASC
;

DROP TABLE TestData;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Results:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 388px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/24253iEF5E37DD88C898FA/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Keep in mind, if you only get 1's - you can check if you have only unique values in the column COUNT.&lt;/P&gt;&lt;P&gt;I hope that helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;S.T.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2019 14:22:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-Peek-don-t-work-with-Preceding-Load/m-p/1650157#M593607</guid>
      <dc:creator>Stoyan_Terziev</dc:creator>
      <dc:date>2019-11-22T14:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Why Peek() don't work with Preceding Load?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-Peek-don-t-work-with-Preceding-Load/m-p/1650186#M593608</link>
      <description>&lt;P&gt;Hi guys and thanks for the suggests.&lt;/P&gt;&lt;P&gt;I'm sorry but i'm not able to solve this problem.&lt;/P&gt;&lt;P&gt;If you can, the original problem is the following:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/QlikView-Scripting/How-can-i-insert-this-expression-in-the-load/td-p/1649631" target="_blank"&gt;https://community.qlik.com/t5/QlikView-Scripting/How-can-i-insert-this-expression-in-the-load/td-p/1649631&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Please, help me!!!&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mattia&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2019 15:05:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-Peek-don-t-work-with-Preceding-Load/m-p/1650186#M593608</guid>
      <dc:creator>Mattia</dc:creator>
      <dc:date>2019-11-22T15:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Why Peek() don't work with Preceding Load?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-Peek-don-t-work-with-Preceding-Load/m-p/1654790#M593609</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/77179"&gt;@Mattia&lt;/a&gt;&amp;nbsp;Hi, it seems the post your linking to has been deleted, please provide the needed details. Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 21:45:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-Peek-don-t-work-with-Preceding-Load/m-p/1654790#M593609</guid>
      <dc:creator>Sue_Macaluso</dc:creator>
      <dc:date>2019-12-05T21:45:47Z</dc:date>
    </item>
  </channel>
</rss>

