<?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: PREVIOUS() function in load script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/PREVIOUS-function-in-load-script/m-p/658809#M1063498</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look at peek and previous function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;ASHFAQ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Sep 2014 08:59:25 GMT</pubDate>
    <dc:creator>ashfaq_haseeb</dc:creator>
    <dc:date>2014-09-22T08:59:25Z</dc:date>
    <item>
      <title>PREVIOUS() function in load script</title>
      <link>https://community.qlik.com/t5/QlikView/PREVIOUS-function-in-load-script/m-p/658808#M1063497</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;I would like to return the previous value (grouped by product). AND I would like to do it &lt;STRONG&gt;in load script&lt;/STRONG&gt;. I have a partial solution, but it is not very elegant or efficient. How this could be done?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" src="https://community.qlik.com/legacyfs/online/67303_pastedImage_0.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2014 08:56:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PREVIOUS-function-in-load-script/m-p/658808#M1063497</guid>
      <dc:creator />
      <dc:date>2014-09-22T08:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: PREVIOUS() function in load script</title>
      <link>https://community.qlik.com/t5/QlikView/PREVIOUS-function-in-load-script/m-p/658809#M1063498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look at peek and previous function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;ASHFAQ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2014 08:59:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PREVIOUS-function-in-load-script/m-p/658809#M1063498</guid>
      <dc:creator>ashfaq_haseeb</dc:creator>
      <dc:date>2014-09-22T08:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: Re: PREVIOUS() function in load script</title>
      <link>https://community.qlik.com/t5/QlikView/PREVIOUS-function-in-load-script/m-p/658810#M1063499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But peek gets only the row (and table) as input argument. So it doesn't work when the product changes, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" src="https://community.qlik.com/legacyfs/online/67313_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Peek() is used in the script, pick()&amp;nbsp; - on the front end.&amp;nbsp; From Help:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;peek(fieldname [ , row [ , tablename ] ] ) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Returns the contents of the fieldname in the record specified by row in the internal table tablename. Data are fetched from the associative QlikView database.&lt;/P&gt;&lt;P&gt;Fieldname must be given as a string (e.g. a quoted literal).&lt;/P&gt;&lt;P&gt;Row 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;/P&gt;&lt;P&gt;If no row is stated, -1 is assumed.&lt;/P&gt;&lt;P&gt;Tablename is a table label, see Table Labels, without the ending colon. If no tablename is stated, the current table is assumed. If used outside the load statement or referring to another table, the tablename must be included. "&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2014 09:48:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PREVIOUS-function-in-load-script/m-p/658810#M1063499</guid>
      <dc:creator />
      <dc:date>2014-09-22T09:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: PREVIOUS() function in load script</title>
      <link>https://community.qlik.com/t5/QlikView/PREVIOUS-function-in-load-script/m-p/658811#M1063502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi user,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PFA. is this is what you are looking for?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;KC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2014 10:04:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PREVIOUS-function-in-load-script/m-p/658811#M1063502</guid>
      <dc:creator>jyothish8807</dc:creator>
      <dc:date>2014-09-22T10:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: PREVIOUS() function in load script</title>
      <link>https://community.qlik.com/t5/QlikView/PREVIOUS-function-in-load-script/m-p/658812#M1063504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Change the line to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Product= previous(Product),previous(Price),'') as Pre_price&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;&lt;STRONG&gt;Regards&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;&lt;STRONG&gt;KC&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2014 10:08:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PREVIOUS-function-in-load-script/m-p/658812#M1063504</guid>
      <dc:creator>jyothish8807</dc:creator>
      <dc:date>2014-09-22T10:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: Re: PREVIOUS() function in load script</title>
      <link>https://community.qlik.com/t5/QlikView/PREVIOUS-function-in-load-script/m-p/658813#M1063505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi user,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PFA updated one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;KC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2014 10:10:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PREVIOUS-function-in-load-script/m-p/658813#M1063505</guid>
      <dc:creator>jyothish8807</dc:creator>
      <dc:date>2014-09-22T10:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: PREVIOUS() function in load script</title>
      <link>https://community.qlik.com/t5/QlikView/PREVIOUS-function-in-load-script/m-p/658814#M1063506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Initial:&lt;/P&gt;&lt;P&gt;Load DATE(DATE#(DATE,'M.D.YYYY')) AS DATE,PRODUCT,PRICE INLINE [&lt;/P&gt;&lt;P&gt;DATE,PRODUCT,PRICE &lt;/P&gt;&lt;P&gt;1.1.2014,A,30&lt;/P&gt;&lt;P&gt;1.2.2014,A,30&lt;/P&gt;&lt;P&gt;1.3.2014,A,29&lt;/P&gt;&lt;P&gt;1.1.2014,B,43&lt;/P&gt;&lt;P&gt;1.2.2014,B,43&lt;/P&gt;&lt;P&gt;1.3.2014,B,40 ];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;Final:&lt;/P&gt;&lt;P&gt;Load DATE,PRODUCT,PRICE,If(PRODUCT = Previous(PRODUCT),PRICE) as PREV_PRICE Resident Initial Order by PRODUCT,DATE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop table Initial;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2014 10:16:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PREVIOUS-function-in-load-script/m-p/658814#M1063506</guid>
      <dc:creator>anbu1984</dc:creator>
      <dc:date>2014-09-22T10:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: Re: PREVIOUS() function in load script</title>
      <link>https://community.qlik.com/t5/QlikView/PREVIOUS-function-in-load-script/m-p/658815#M1063507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course! It's so simple, thanks! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2014 10:22:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PREVIOUS-function-in-load-script/m-p/658815#M1063507</guid>
      <dc:creator />
      <dc:date>2014-09-22T10:22:10Z</dc:date>
    </item>
  </channel>
</rss>

