<?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 SV:calculate fieldvalue based on previous record, only field value first record is known in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/calculate-fieldvalue-based-on-previous-record-only-field-value/m-p/227196#M79319</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Toni, exactly what I was looking for. Good to know that QV peek function looks at the previous modified record and not at the 'original' table record.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Apr 2011 17:29:34 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-04-22T17:29:34Z</dc:date>
    <item>
      <title>calculate fieldvalue based on previous record, only field value first record is known</title>
      <link>https://community.qlik.com/t5/QlikView/calculate-fieldvalue-based-on-previous-record-only-field-value/m-p/227194#M79317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Simplified example:&lt;/P&gt;&lt;P&gt;I'm trying to calculate a fieldvalue in every row of a table.The calculation of the value is based on the previous record where only the first record is known. The formula looks like this: 6 * previous(fieldvalue).&lt;/P&gt;&lt;P&gt;Only the value of the first record is known. For example the Calculatedfield value of record 4 is based on the previous calculatedfield value of record 3 which is unknown.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="height: 119px;" width="150"&gt;&lt;COL style="width: 44pt;" width="58" /&gt;&lt;COL style="width: 44pt;" width="59" /&gt;&lt;TBODY&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="height: 12.75pt; width: 44pt;" width="58"&gt;RowID&lt;/TD&gt;&lt;TD class="xl66" style="width: 44pt;" width="59"&gt;Calculatedfield&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl67" height="17" style="height: 12.75pt;"&gt;1&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="height: 12.75pt;"&gt;2&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl68" height="17" style="height: 12.75pt;"&gt;3&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none; border-left: medium none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl68" height="17" style="height: 12.75pt; border-top: medium none;"&gt;4&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none; border-left: medium none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="height: 12.75pt;"&gt;5&lt;/TD&gt;&lt;TD class="xl67"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="height: 12.75pt;"&gt;6&lt;/TD&gt;&lt;TD class="xl67"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried some do while loops but I can't get it to work. Any suggestions are very welcome!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Apr 2011 14:34:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculate-fieldvalue-based-on-previous-record-only-field-value/m-p/227194#M79317</guid>
      <dc:creator />
      <dc:date>2011-04-22T14:34:00Z</dc:date>
    </item>
    <item>
      <title>SV:calculate fieldvalue based on previous record, only field value first record is known</title>
      <link>https://community.qlik.com/t5/QlikView/calculate-fieldvalue-based-on-previous-record-only-field-value/m-p/227195#M79318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You shoul be able to solve that operation by using Peek() during load.&lt;/P&gt;&lt;P&gt;T1:&lt;BR /&gt;LOAD * Inline [&lt;BR /&gt;F1, F2&lt;BR /&gt;1, 4&lt;BR /&gt;2, 0&lt;BR /&gt;3, 0&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T2:&lt;BR /&gt;LOAD&lt;BR /&gt;F1 as F3,&lt;BR /&gt;if(RowNo()=1, F2, Peek(F4) * 6) as F4&lt;BR /&gt;RESIDENT T1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Apr 2011 15:33:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculate-fieldvalue-based-on-previous-record-only-field-value/m-p/227195#M79318</guid>
      <dc:creator>ToniKautto</dc:creator>
      <dc:date>2011-04-22T15:33:00Z</dc:date>
    </item>
    <item>
      <title>SV:calculate fieldvalue based on previous record, only field value first record is known</title>
      <link>https://community.qlik.com/t5/QlikView/calculate-fieldvalue-based-on-previous-record-only-field-value/m-p/227196#M79319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Toni, exactly what I was looking for. Good to know that QV peek function looks at the previous modified record and not at the 'original' table record.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Apr 2011 17:29:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculate-fieldvalue-based-on-previous-record-only-field-value/m-p/227196#M79319</guid>
      <dc:creator />
      <dc:date>2011-04-22T17:29:34Z</dc:date>
    </item>
  </channel>
</rss>

