<?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: Using data from previous rows in the calculations in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-data-from-previous-rows-in-the-calculations/m-p/1692892#M593741</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Search for accumulation in the script.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One example:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/New-to-QlikView/Accumulation-in-Script/td-p/319965" target="_blank"&gt;https://community.qlik.com/t5/New-to-QlikView/Accumulation-in-Script/td-p/319965&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 13 Apr 2020 03:55:05 GMT</pubDate>
    <dc:creator>Saravanan_Desingh</dc:creator>
    <dc:date>2020-04-13T03:55:05Z</dc:date>
    <item>
      <title>Using data from previous rows in the calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Using-data-from-previous-rows-in-the-calculations/m-p/1690702#M593740</link>
      <description>&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;I have a problem and I hope that someone from the more experienced community members than I am can help me in solving it. I have something like rooster data looking similar to what you see below. For each rooster consisting of several time periods (marked with index numbers) I have begin and end time of the whole rooster and duration of each time period. From that I need to calculate begin and end time of each time period. For each id and date the indexes start from 1, so that for ID 569 it will again be 1,2,3,4 etc.&lt;/P&gt;&lt;P&gt;I was thinking of adding the sum of the duration of previous rows (indexes) to the begin time rooster for each particular id and date. So that in the below example the begin time for index 2 will be 09:00 + 15 = 09:15, and the begin time for index 3 will be 09:00 + 15 + 30 = 09:45. But I don't quite know how to realise it in the load statement of qlikview. I was thinking of using peek or previous functions but did not get very far. Thank you in advance for your help and advice.&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="47px"&gt;index&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="47px"&gt;id&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="47px"&gt;begin time rooster&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="47px"&gt;end time rooster&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="47px"&gt;date&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="47px"&gt;duration&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;568&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;09:00&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;11:30&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;03-01-2019&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;2&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;568&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;09:00&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;11:30&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;03-01-2019&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;3&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;568&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;09:00&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;11:30&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;03-01-2019&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;4&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;568&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;09:00&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;11:30&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;03-01-2019&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;75&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;5&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;568&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;09:00&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;11:30&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;03-01-2019&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 03 Apr 2020 12:24:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-data-from-previous-rows-in-the-calculations/m-p/1690702#M593740</guid>
      <dc:creator>Polina</dc:creator>
      <dc:date>2020-04-03T12:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using data from previous rows in the calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Using-data-from-previous-rows-in-the-calculations/m-p/1692892#M593741</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Search for accumulation in the script.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One example:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/New-to-QlikView/Accumulation-in-Script/td-p/319965" target="_blank"&gt;https://community.qlik.com/t5/New-to-QlikView/Accumulation-in-Script/td-p/319965&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2020 03:55:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-data-from-previous-rows-in-the-calculations/m-p/1692892#M593741</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2020-04-13T03:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using data from previous rows in the calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Using-data-from-previous-rows-in-the-calculations/m-p/1701043#M593742</link>
      <description>&lt;P&gt;I only now had time to check this! Thank you for the helpful hint! It worked! I used functions Previous, RangeSum and Peek as mentioned in the link you have provided and it works the way I want it.&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2020 10:45:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-data-from-previous-rows-in-the-calculations/m-p/1701043#M593742</guid>
      <dc:creator>Polina</dc:creator>
      <dc:date>2020-05-12T10:45:52Z</dc:date>
    </item>
  </channel>
</rss>

