<?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 Read Row in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Previous-Read-Row/m-p/856876#M300203</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD Field1, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field2, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alt((peek(Result2)*2 + Field1 )/2, Field1) as Result2&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;[Prev Row Example.xlsx]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(ooxml, embedded labels, table is Hoja1);&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Jul 2015 04:36:09 GMT</pubDate>
    <dc:creator>maxgro</dc:creator>
    <dc:date>2015-07-13T04:36:09Z</dc:date>
    <item>
      <title>Previous Read Row</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Read-Row/m-p/856868#M300195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys, I've the following example :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 240px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" width="80"&gt;Field1&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="80"&gt;Field2&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="80"&gt;Result&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;10&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;20&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;30&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;3,5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;40&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;5,5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;5&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;50&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where the field Result needs the value of the previous value of Result itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that you can get the previous value of Field1 or Field2 because there aren't the same column fields, but when is the same column, it says "error" because Qlik can't find the field "Result" because it doesn't even exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the calculation I can't do in Qlik --&amp;gt; &lt;STRONG&gt;Result =(previous(Result)*2 + Field1 )/2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can you do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attack an excel example of what I mean.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Marcel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Jul 2015 18:39:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Read-Row/m-p/856868#M300195</guid>
      <dc:creator>marcel_olmo</dc:creator>
      <dc:date>2015-07-12T18:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Read Row</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Read-Row/m-p/856869#M300196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;LOAD Field1, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field2, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alt((previous(Result)*2 + Field1 )/2, Field1) as Result&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;[Prev Row Example.xlsx]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(ooxml, embedded labels, table is Hoja1);&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Jul 2015 18:53:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Read-Row/m-p/856869#M300196</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-07-12T18:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Read Row</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Read-Row/m-p/856870#M300197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PEEK() can do what you want, addressing the output from the row loaded before:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD Field1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Rangesum&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;(Peek(Result)*2, Field1 )/2 AS Result&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;FROM ....;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;edit: Corrected rangesum() arguments separated by comma&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Jul 2015 18:56:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Read-Row/m-p/856870#M300197</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-07-12T18:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Read Row</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Read-Row/m-p/856871#M300198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Massimo for answering so quickly,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the point is that there's no Result column in my database, I have to calculate it from Field1 and Field2. This is an example trying to show what I'm trying to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My result field is something like :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if( rowno() =1,1, (previous(NewField) * 2 + Field1)/2 as NewField.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do that, Qlik says that "NewField" it doesn't exists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can you do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Marcel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Jul 2015 19:02:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Read-Row/m-p/856871#M300198</guid>
      <dc:creator>marcel_olmo</dc:creator>
      <dc:date>2015-07-12T19:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Read Row</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Read-Row/m-p/856872#M300199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks &lt;SPAN style="font-size: 11.6999998092651px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;A href="https://community.qlik.com/people/swuehl"&gt;swuehl&lt;/A&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;I've just wrote the point of that in the answer before. There's no such Result field in the database, that's why Qlik doesn't let me do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached what I mean.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Marcel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Jul 2015 19:04:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Read-Row/m-p/856872#M300199</guid>
      <dc:creator>marcel_olmo</dc:creator>
      <dc:date>2015-07-12T19:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Read Row</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Read-Row/m-p/856873#M300200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you even tried the script I've posted?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I am not loading the Result column, but calculating it from Field1 and the previous&lt;EM&gt; output table&lt;/EM&gt; row only.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do get Result 0.5 off, but that's what your expression returns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: emphasized that peek() returns previous output table row and uploaded sample QVW&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Jul 2015 19:10:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Read-Row/m-p/856873#M300200</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-07-12T19:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Read Row</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Read-Row/m-p/856874#M300201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcel,&lt;/P&gt;&lt;P&gt;simply You add&lt;/P&gt;&lt;P&gt;If(RowNo() &amp;gt; 1,Swuel' expression,1) as Result&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Jul 2015 19:36:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Read-Row/m-p/856874#M300201</guid>
      <dc:creator>antoniotiman</dc:creator>
      <dc:date>2015-07-12T19:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Read Row</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Read-Row/m-p/856875#M300202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks &lt;STRONG style="font-size: 11.6999998092651px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="https://community.qlik.com/people/swuehl"&gt;swuehl&lt;/A&gt;&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;I've got the issue there. If you use the function Previous() it says the field doesn't exist, but not the function peek().&lt;/P&gt;&lt;P&gt;Thanks a lot for your useful help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Marcel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Jul 2015 22:07:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Read-Row/m-p/856875#M300202</guid>
      <dc:creator>marcel_olmo</dc:creator>
      <dc:date>2015-07-12T22:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Read Row</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Read-Row/m-p/856876#M300203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD Field1, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field2, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alt((peek(Result2)*2 + Field1 )/2, Field1) as Result2&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;[Prev Row Example.xlsx]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(ooxml, embedded labels, table is Hoja1);&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 04:36:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Read-Row/m-p/856876#M300203</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-07-13T04:36:09Z</dc:date>
    </item>
  </channel>
</rss>

