<?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 in load script in Qlik Learning Discussions</title>
    <link>https://community.qlik.com/t5/Qlik-Learning-Discussions/Peek-function-in-load-script/m-p/790340#M2265</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;id, field, counter&lt;/P&gt;&lt;P&gt;1, bla,0&lt;/P&gt;&lt;P&gt;1, bla,0&lt;/P&gt;&lt;P&gt;1, bla,0&lt;/P&gt;&lt;P&gt;2, bla,0&lt;/P&gt;&lt;P&gt;2, bla,0&lt;/P&gt;&lt;P&gt;2, bla,0&lt;/P&gt;&lt;P&gt;3, bla,0&lt;/P&gt;&lt;P&gt;3, bla,0&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp2:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;id,&lt;/P&gt;&lt;P&gt;field,&lt;/P&gt;&lt;P&gt;IF (Previous(id)&amp;lt;&amp;gt;id,1, peek(counter2) + 1) AS counter2&lt;/P&gt;&lt;P&gt;RESIDENT Temp&lt;/P&gt;&lt;P&gt;ORDER BY id;&lt;/P&gt;&lt;P&gt;drop table Temp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Feb 2015 17:03:31 GMT</pubDate>
    <dc:creator>MK_QSL</dc:creator>
    <dc:date>2015-02-25T17:03:31Z</dc:date>
    <item>
      <title>Peek function in load script</title>
      <link>https://community.qlik.com/t5/Qlik-Learning-Discussions/Peek-function-in-load-script/m-p/790337#M2262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a simple load :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;id, field, counter&lt;/P&gt;&lt;P&gt;1, bla,0&lt;/P&gt;&lt;P&gt;1, bla,0&lt;/P&gt;&lt;P&gt;1, bla,0&lt;/P&gt;&lt;P&gt;2, bla,0&lt;/P&gt;&lt;P&gt;2, bla,0&lt;/P&gt;&lt;P&gt;2, bla,0&lt;/P&gt;&lt;P&gt;3, bla,0&lt;/P&gt;&lt;P&gt;3, bla,0&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp2:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;id,&lt;/P&gt;&lt;P&gt;field,&lt;/P&gt;&lt;P&gt;IF (peek(id)&amp;lt;&amp;gt;id,1, peek(counter) + 1) AS counter2&lt;/P&gt;&lt;P&gt;RESIDENT Temp&lt;/P&gt;&lt;P&gt;ORDER BY id;&lt;/P&gt;&lt;P&gt;drop table Temp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to get a counter which reset for each new id find&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get only 1 for each new id, but it doesn't increment when he find 2 same id :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Sans titre.png" class="image-1 jive-image" src="/legacyfs/online/79213_Sans titre.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Feb 2015 15:37:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Learning-Discussions/Peek-function-in-load-script/m-p/790337#M2262</guid>
      <dc:creator />
      <dc:date>2015-02-25T15:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: Peek function in load script</title>
      <link>https://community.qlik.com/t5/Qlik-Learning-Discussions/Peek-function-in-load-script/m-p/790338#M2263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;IF (peek(id)&amp;lt;&amp;gt;id,1, peek('counter2') + 1) AS counter2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;IF (peek(id)&amp;lt;&amp;gt;id,1, peek(counter2) + 1) AS counter2&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Feb 2015 16:01:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Learning-Discussions/Peek-function-in-load-script/m-p/790338#M2263</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-02-25T16:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: Peek function in load script</title>
      <link>https://community.qlik.com/t5/Qlik-Learning-Discussions/Peek-function-in-load-script/m-p/790339#M2264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the solution unfortunatly it does not work hen I rename my column : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example if I write this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp2:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;id as toto,&lt;/P&gt;&lt;P&gt;field,&lt;/P&gt;&lt;P&gt;//IF (peek(id)&amp;lt;&amp;gt;id,1, peek(counter) + 1) AS counter2&lt;/P&gt;&lt;P&gt;IF (peek(id)&amp;lt;&amp;gt;id,1, peek('counter2') + 1) AS counter2,&lt;/P&gt;&lt;P&gt;peek(id) as previousvalue&lt;/P&gt;&lt;P&gt;RESIDENT Temp&lt;/P&gt;&lt;P&gt;ORDER BY id;&lt;/P&gt;&lt;P&gt;drop table Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the result is :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Sans titre.png" class="image-1 jive-image" src="/legacyfs/online/79227_Sans titre.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because I add as toto&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Feb 2015 16:58:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Learning-Discussions/Peek-function-in-load-script/m-p/790339#M2264</guid>
      <dc:creator />
      <dc:date>2015-02-25T16:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: Peek function in load script</title>
      <link>https://community.qlik.com/t5/Qlik-Learning-Discussions/Peek-function-in-load-script/m-p/790340#M2265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;id, field, counter&lt;/P&gt;&lt;P&gt;1, bla,0&lt;/P&gt;&lt;P&gt;1, bla,0&lt;/P&gt;&lt;P&gt;1, bla,0&lt;/P&gt;&lt;P&gt;2, bla,0&lt;/P&gt;&lt;P&gt;2, bla,0&lt;/P&gt;&lt;P&gt;2, bla,0&lt;/P&gt;&lt;P&gt;3, bla,0&lt;/P&gt;&lt;P&gt;3, bla,0&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp2:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;id,&lt;/P&gt;&lt;P&gt;field,&lt;/P&gt;&lt;P&gt;IF (Previous(id)&amp;lt;&amp;gt;id,1, peek(counter2) + 1) AS counter2&lt;/P&gt;&lt;P&gt;RESIDENT Temp&lt;/P&gt;&lt;P&gt;ORDER BY id;&lt;/P&gt;&lt;P&gt;drop table Temp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Feb 2015 17:03:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Learning-Discussions/Peek-function-in-load-script/m-p/790340#M2265</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-02-25T17:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: Peek function in load script</title>
      <link>https://community.qlik.com/t5/Qlik-Learning-Discussions/Peek-function-in-load-script/m-p/790341#M2266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;one more easier way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; *,&lt;/P&gt;&lt;P&gt;&amp;nbsp; AutoNumber(RecNo(),id) as counter22&lt;/P&gt;&lt;P&gt;INLINE [&lt;/P&gt;&lt;P&gt;id, field, counter&lt;/P&gt;&lt;P&gt;1, bla,0&lt;/P&gt;&lt;P&gt;1, bla,0&lt;/P&gt;&lt;P&gt;1, bla,0&lt;/P&gt;&lt;P&gt;2, bla,0&lt;/P&gt;&lt;P&gt;2, bla,0&lt;/P&gt;&lt;P&gt;2, bla,0&lt;/P&gt;&lt;P&gt;3, bla,0&lt;/P&gt;&lt;P&gt;3, bla,0&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Feb 2015 17:06:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Learning-Discussions/Peek-function-in-load-script/m-p/790341#M2266</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-02-25T17:06:30Z</dc:date>
    </item>
  </channel>
</rss>

