<?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: How to get previous &amp; next row values through script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929783#M321551</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was wondering why Peek was not working and forgot to use Previous. But I still don't know why Previous works and Peek doesn't when using Join.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 15 Aug 2015 09:14:19 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2015-08-15T09:14:19Z</dc:date>
    <item>
      <title>How to get previous &amp; next row values through script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929778#M321546</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 have requirement from client as briefed below,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The current year sales amount should be multiplied by current, previous &amp;amp; next year exchange rate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please refer the data below,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Year, Exchange Rate, Sales Amount&lt;/P&gt;&lt;P&gt;2006, 1.5, 100&lt;/P&gt;&lt;P&gt;2007, 2, 200&lt;/P&gt;&lt;P&gt;2008, 2.5, 300&lt;/P&gt;&lt;P&gt;2009, 1, 200&lt;/P&gt;&lt;P&gt;2010, 1.5 , 100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, from above data set I need to get the output as mentioned below,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="162" style="width: 425px; height: 164px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="92"&gt;Previous Year&lt;/TD&gt;&lt;TD width="94"&gt;Current Year&lt;/TD&gt;&lt;TD width="87"&gt;Next Year&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20"&gt;2006&lt;/TD&gt;&lt;TD&gt;100*1.5 = 150&lt;/TD&gt;&lt;TD&gt;100*2= 200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20"&gt;2007&lt;/TD&gt;&lt;TD&gt;200*1.5= 300&lt;/TD&gt;&lt;TD&gt;200*2= 400&lt;/TD&gt;&lt;TD&gt;200*2.5= 500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20"&gt;2008&lt;/TD&gt;&lt;TD&gt;300*2= 600&lt;/TD&gt;&lt;TD&gt;300*2.5=750&lt;/TD&gt;&lt;TD&gt;300*1=300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20"&gt;2009&lt;/TD&gt;&lt;TD&gt;200*2.5=500&lt;/TD&gt;&lt;TD&gt;200*1=200&lt;/TD&gt;&lt;TD&gt;200*1.5=300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20"&gt;2010&lt;/TD&gt;&lt;TD&gt;100*1=100&lt;/TD&gt;&lt;TD&gt;100*1.5=150&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anyone please help to achieve this scenario via script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Karthikeyan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2015 08:21:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929778#M321546</guid>
      <dc:creator>karthikeyan1504</dc:creator>
      <dc:date>2015-08-15T08:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to get previous &amp; next row values through script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929779#M321547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14396278275149905 jive_text_macro" jivemacro_uid="_14396278275149905" modifiedtitle="true"&gt;
&lt;P&gt;Temp1:&lt;/P&gt;
&lt;P&gt;Load * Inline&lt;/P&gt;
&lt;P&gt;[&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Year, Exchange Rate, Sales Amount&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 2006, 1.5, 100&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 2007, 2, 200&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 2008, 2.5, 300&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 2009, 1, 200&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 2010, 1.5, 100&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Left Join (Temp1)&lt;/P&gt;
&lt;P&gt;Load&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Year,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Previous([Exchange Rate]) as NextER&lt;/P&gt;
&lt;P&gt;Resident Temp1&lt;/P&gt;
&lt;P&gt;Order By Year Desc;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Left Join (Temp1)&lt;/P&gt;
&lt;P&gt;Load&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Year,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Previous([Exchange Rate]) as PreviousER&lt;/P&gt;
&lt;P&gt;Resident Temp1&lt;/P&gt;
&lt;P&gt;Order By Year Asc;&lt;/P&gt;

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2015 08:37:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929779#M321547</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-08-15T08:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to get previous &amp; next row values through script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929780#M321548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do it like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;SET ThousandSep=',';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;SET DecimalSep='.';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;INPUT:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;LOAD * INLINE [&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;Year, Exchange Rate, Sales Amount&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;2006, 1.5, 100&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;2007, 2, 200&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;2008, 2.5, 300&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;2009, 1, 200&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;2010, 1.5 , 100&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;LOAD Year, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;&amp;nbsp; Previous([Exchange Rate])*[Sales Amount] as Previous,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;&amp;nbsp; [Exchange Rate]*[Sales Amount] as Current&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;RESIDENT INPUT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;LEFT JOIN&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;LOAD Year, previous([Exchange Rate])*[Sales Amount] as Next&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;RESIDENT INPUT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;ORDER BY Year desc&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2015 08:38:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929780#M321548</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-08-15T08:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to get previous &amp; next row values through script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929781#M321549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This?&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/96156_Capture.PNG" style="max-width: 620px; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * Inline [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Year, Exchange Rate, Sales Amount&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2006, 1.5, 100&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2007, 2, 200&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2008, 2.5, 300&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2009, 1, 200&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2010, 1.5 , 100&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NewTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Year,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; [Sales Amount],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; [Exchange Rate],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Alt(Peek('Exchange Rate'), 0) as NextXR&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Order By Year;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table Table;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; [Sales Amount] * [Exchange Rate] as CurrSalesAmt,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; [Sales Amount] * NextXR as NextSalesAmt,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; [Sales Amount] * PreviousXR as PreviousSalesAmt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Year,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; [Sales Amount],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; [Exchange Rate],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; NextXR,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Alt(Peek('Exchange Rate'), 0) as PreviousXR&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident NewTable&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Order By Year desc;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table NewTable;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2015 08:45:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929781#M321549</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-08-15T08:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to get previous &amp; next row values through script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929782#M321550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another method using Mapping Load:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Mapping:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Mapping&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * Inline [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Year, Exchange Rate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2006, 1.5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2007, 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2008, 2.5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2009, 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2010, 1.5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Year,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; [Sales Amount] * ApplyMap('Mapping', Year) as CurSalesAmt,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; [Sales Amount] * ApplyMap('Mapping', Year - 1, 0) as NextSalesAmt,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; [Sales Amount] * ApplyMap('Mapping', Year + 1, 0) as PreviousSalesAmt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * Inline [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Year, Sales Amount&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2006, 100&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2007, 200&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2008, 300&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2009, 200&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2010, 100&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2015 09:09:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929782#M321550</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-08-15T09:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to get previous &amp; next row values through script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929783#M321551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was wondering why Peek was not working and forgot to use Previous. But I still don't know why Previous works and Peek doesn't when using Join.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2015 09:14:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929783#M321551</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-08-15T09:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to get previous &amp; next row values through script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929784#M321552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes.. Even I tried with Peek and Previous but it gave different output..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response.. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2015 09:28:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929784#M321552</guid>
      <dc:creator>karthikeyan1504</dc:creator>
      <dc:date>2015-08-15T09:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to get previous &amp; next row values through script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929785#M321553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you everyone..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All your responses are overwhelming... My job is getting smarter day by day being in community..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Warm Regards,&lt;/P&gt;&lt;P&gt;Karthikeyan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2015 09:29:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929785#M321553</guid>
      <dc:creator>karthikeyan1504</dc:creator>
      <dc:date>2015-08-15T09:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to get previous &amp; next row values through script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929786#M321554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not a problem. &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 am glad we were helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. even though you got your solution, but I would suggest looking into the mapping load option as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2015 09:32:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929786#M321554</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-08-15T09:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to get previous &amp; next row values through script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929787#M321555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14396320394169535" jivemacro_uid="_14396320394169535" modifiedtitle="true"&gt;
&lt;P&gt;Temp1:&lt;/P&gt;
&lt;P&gt;Load * Inline&lt;/P&gt;
&lt;P&gt;[&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Year, Exchange Rate, Sales Amount&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 2006, 1, 100&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 2007, 2, 200&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 2008, 3, 300&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 2009, 4, 200&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 2010, 5, 100&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Left Join (Temp1)&lt;/P&gt;
&lt;P&gt;Load&lt;/P&gt;
&lt;P&gt;&amp;nbsp; RowNo() as ID,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Year,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Peek('Exchange Rate',RowNo(),'Temp1') as NextER&lt;/P&gt;
&lt;P&gt;Resident Temp1&lt;/P&gt;
&lt;P&gt;Order By Year Asc;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Drop Field ID;&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;&amp;nbsp; Year, [Exchange Rate] as TempRate&lt;/P&gt;
&lt;P&gt;Resident Temp1&lt;/P&gt;
&lt;P&gt;Order By Year Desc;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Left Join (Temp1)&lt;/P&gt;
&lt;P&gt;Load&lt;/P&gt;
&lt;P&gt;&amp;nbsp; RowNo() as ID,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Year,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; TempRate,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Peek('TempRate',RowNo(),'Temp2') as PreER&lt;/P&gt;
&lt;P&gt;Resident Temp2&lt;/P&gt;
&lt;P&gt;Order By Year Desc;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Drop Table Temp2;&lt;/P&gt;
&lt;P&gt;Drop Field ID;&lt;/P&gt;

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2015 09:47:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929787#M321555</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-08-15T09:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to get previous &amp; next row values through script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929788#M321556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please can you explain difference between two solutions given by you.&lt;/P&gt;&lt;P&gt;in first solution Previous Function was used and second Peek Function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Neetha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2015 09:55:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929788#M321556</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-15T09:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to get previous &amp; next row values through script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929789#M321557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Neetha,&lt;/P&gt;&lt;P&gt;Request you to go through about the Previous and Peek functions and try to use my code step by step.&lt;/P&gt;&lt;P&gt;You will realize the difference..&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2015 10:13:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929789#M321557</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-08-15T10:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to get previous &amp; next row values through script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929790#M321558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure thanks Manish.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Neetha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2015 10:17:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929790#M321558</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-15T10:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to get previous &amp; next row values through script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929791#M321559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/4003"&gt;hic&lt;/A&gt;‌ . Could you please explain us why Previous is working with Asc and Desc order but Peek is not working ?&lt;/P&gt;&lt;P&gt;I have done some work around in script for Peek function but not getting the logic behind Peek function now giving the same result as Previous. &lt;/P&gt;&lt;P&gt;Thaanks !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2015 11:23:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929791#M321559</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-08-15T11:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to get previous &amp; next row values through script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929792#M321560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;While we are inviting Henric for explanation, why not get some information on RowNo() and RecNo() as well. I have seen it behaving similar to Peek and Previous, respectively.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2015 11:54:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929792#M321560</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-08-15T11:54:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to get previous &amp; next row values through script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929793#M321561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do get the same results using Peek():&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;SET ThousandSep&lt;EM&gt;=',';&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;SET DecimalSep='.';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;INPUT:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;LOAD * INLINE [&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;Year, Exchange Rate, Sales Amount&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;2006, 1.5, 100&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;2007, 2, 200&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;2008, 2.5, 300&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;2009, 1, 200&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;2010, 1.5 , 100&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;Years:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;LOAD Year,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;&amp;nbsp; [Exchange Rate],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;&amp;nbsp; Peek([Exchange Rate])*[Sales Amount] as Previous,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;&amp;nbsp; [Exchange Rate]*[Sales Amount] as Current&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;RESIDENT INPUT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;LEFT JOIN&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;LOAD Year, [Exchange Rate], Peek([Exchange Rate])*[Sales Amount] as Next&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;RESIDENT INPUT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;ORDER BY Year desc&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;DROP FIELD [Exchange Rate] FROM Years;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding peek() vs previous() and rowno() vs recno(), it's all about input vs. output table records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From &lt;A href="https://community.qlik.com/qlik-blogpost/3292"&gt;Counters in the Load&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f5faf0;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: underline;"&gt;Using &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000ff;"&gt;RecNo&lt;/SPAN&gt;()&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f5faf0;"&gt;The RecNo() function simply counts the &lt;EM style="font-weight: inherit; font-family: inherit;"&gt;input&lt;/EM&gt; records and returns the number of the current record. Simple, and very useful if you want to create a record ID. However, if you concatenate several input files, or use a While clause, the numbers will not be unique.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f5faf0;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: underline;"&gt;Using &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000ff;"&gt;RowNo&lt;/SPAN&gt;()&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f5faf0;"&gt;The RowNo() function is very similar to the RecNo(), but this instead counts the &lt;EM style="font-weight: inherit; font-family: inherit;"&gt;output&lt;/EM&gt; records and returns the number of the current record. Also simple and useful, especially if you concatenate several input tables. In such a case, the function will return consecutive numbers for the output table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2015 12:27:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929793#M321561</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-08-15T12:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to get previous &amp; next row values through script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929794#M321562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefen,&lt;/P&gt;&lt;P&gt;Let me know why we are not getting results below?&lt;/P&gt;&lt;P&gt;What is being missed? I have already spent 2 hours to understand the behavior but failed.&lt;/P&gt;&lt;P&gt;I have already tried&lt;/P&gt;&lt;P&gt;Peek([Exchange Rate])&lt;/P&gt;&lt;P&gt;Peek('Exchange Rate')&lt;/P&gt;&lt;P&gt;Peek('[Exchange Rate]')&lt;/P&gt;&lt;P&gt;Objective is simply to get Previous and Next Exchange Rate for each Year. &lt;BR /&gt;I am sure, something I missed which is not allowing me to get the desired result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INPUT:&lt;/P&gt;&lt;P&gt;LOAD * INLINE&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;&amp;nbsp; Year, Exchange Rate, Sales Amount&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2006, 1, 100&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2007, 2, 200&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2008, 3, 300&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2009, 4, 200&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2010, 5, 100&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Left Join (INPUT)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; Year,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Previous([Exchange Rate]) as Previous1,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Peek('Exchange Rate') as Previous2&lt;/P&gt;&lt;P&gt;RESIDENT INPUT;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEFT JOIN (INPUT)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; Year,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Previous([Exchange Rate]) as Next1,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Peek('Exchange Rate') as Next&lt;/P&gt;&lt;P&gt;RESIDENT INPUT&lt;/P&gt;&lt;P&gt;ORDER BY Year Desc;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2015 12:39:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929794#M321562</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-08-15T12:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to get previous &amp; next row values through script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929795#M321563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;INPUT:&lt;/P&gt;&lt;P&gt;LOAD * INLINE&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;&amp;nbsp; Year, Exchange Rate, Sales Amount&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2006, 1, 100&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2007, 2, 200&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2008, 3, 300&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2009, 4, 200&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2010, 5, 100&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Left Join (INPUT)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; Year,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;EM&gt;[Exchange Rate],&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Previous([Exchange Rate]) as Previous1,&lt;/P&gt;&lt;P&gt; &lt;EM&gt; Peek('Exchange Rate') as Previous2&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;RESIDENT INPUT;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEFT JOIN (INPUT)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; Year,&lt;/P&gt;&lt;P&gt; &lt;EM&gt; [Exchange Rate],&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Previous([Exchange Rate]) as Next1,&lt;/P&gt;&lt;P&gt; &lt;EM&gt; Peek('Exchange Rate') as Next&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;RESIDENT INPUT&lt;/P&gt;&lt;P&gt;ORDER BY Year Desc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to take care that [Exchange Rate] is part of your output table when you want to use Peek() function.&lt;/P&gt;&lt;P&gt;I believe the relevant output table here is looking at the table before the JOIN happens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, Peek() just silently fails when the field does not exist (well, wait, probably that's by design, otherwise you would probably run into trroubles when you want to peek() fields that are just created in the same LOAD).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2015 12:50:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929795#M321563</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-08-15T12:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to get previous &amp; next row values through script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929796#M321564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ohhh! Clear now.. I was using Peek function without loading [Exchange Rate].&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/laugh.png" /&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/silly.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2015 13:01:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929796#M321564</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-08-15T13:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to get previous &amp; next row values through script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929797#M321565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me see once I complete the full data model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Warm Regards,&lt;/P&gt;&lt;P&gt;Karthikeyan. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2015 13:36:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-previous-next-row-values-through-script/m-p/929797#M321565</guid>
      <dc:creator>karthikeyan1504</dc:creator>
      <dc:date>2015-08-15T13:36:51Z</dc:date>
    </item>
  </channel>
</rss>

