<?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: Sum of current + previous rows in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-of-current-previous-rows/m-p/1590540#M596329</link>
    <description>What was the issue with RangeSum and Above? that in my opinion is the way to go&lt;BR /&gt;please share expression you tried and issue</description>
    <pubDate>Tue, 11 Jun 2019 14:48:09 GMT</pubDate>
    <dc:creator>dplr-rn</dc:creator>
    <dc:date>2019-06-11T14:48:09Z</dc:date>
    <item>
      <title>Sum of current + previous rows</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-of-current-previous-rows/m-p/1590457#M596328</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am looking to achieve the following but am not sure how to achieve this.&lt;/P&gt;&lt;P&gt;I have created the table as below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="QV 1.png" style="width: 397px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/13544i4F2AB2078307588D/image-size/large?v=v2&amp;amp;px=999" role="button" title="QV 1.png" alt="QV 1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now I want to add the sum of the current "Outstanding Amount" value for a customers row and of the previous ones in a separate column (Total Outstanding Amount).&lt;/P&gt;&lt;P&gt;So on the 2nd row, the value of this column would be 5.444,88+43.432,67=48.877,55&lt;/P&gt;&lt;P&gt;On the 3rd row that would then be 107.593,08+5.444,88+43.432,67 etc.&lt;/P&gt;&lt;P&gt;I have tried RangeSum with Above but was not able to achieve this.&lt;/P&gt;&lt;P&gt;How should I approach this ?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 12:01:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-of-current-previous-rows/m-p/1590457#M596328</guid>
      <dc:creator>katwijck</dc:creator>
      <dc:date>2019-06-12T12:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: Sum of current + previous rows</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-of-current-previous-rows/m-p/1590540#M596329</link>
      <description>What was the issue with RangeSum and Above? that in my opinion is the way to go&lt;BR /&gt;please share expression you tried and issue</description>
      <pubDate>Tue, 11 Jun 2019 14:48:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-of-current-previous-rows/m-p/1590540#M596329</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-06-11T14:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: Sum of current + previous rows</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-of-current-previous-rows/m-p/1590555#M596330</link>
      <description>&lt;P&gt;May be this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Aggr(
  RangeSum(Above(Sum(Amount), 0, RowNo()))
, [Klant nr.], [%WerkDagDatum])&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 11 Jun 2019 15:02:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-of-current-previous-rows/m-p/1590555#M596330</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-06-11T15:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: Sum of current + previous rows</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-of-current-previous-rows/m-p/1590620#M596331</link>
      <description>&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;After changing the "Amount" field with the "Outstanding Amount" field this did the trick!&lt;/P&gt;&lt;P&gt;Thank you for this.&lt;/P&gt;&lt;P&gt;I slightly changed the expression like below to calculate the "future" which is determined by the "Delivery" field:&lt;/P&gt;&lt;P&gt;Aggr(RangeSum(Below(Sum(Delivery),0,RowNo())), [Klant nr.], [%WerkDagDatum])&lt;/P&gt;&lt;P&gt;How should I modify this so that I can sum the amount of "Delivery" until 14 days of the current row date value ?&lt;/P&gt;&lt;P&gt;With kind regards,&lt;/P&gt;&lt;P&gt;Martin van der Bent&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2019 19:04:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-of-current-previous-rows/m-p/1590620#M596331</guid>
      <dc:creator>katwijck</dc:creator>
      <dc:date>2019-06-11T19:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: Sum of current + previous rows</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-of-current-previous-rows/m-p/1590621#M596332</link>
      <description>Hi Dilipranjith,&lt;BR /&gt;I ended with the value of "0" because I didn't use the Aggr function as mentioned by Sunny below.</description>
      <pubDate>Tue, 11 Jun 2019 19:06:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-of-current-previous-rows/m-p/1590621#M596332</guid>
      <dc:creator>katwijck</dc:creator>
      <dc:date>2019-06-11T19:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: Sum of current + previous rows</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-of-current-previous-rows/m-p/1590627#M596333</link>
      <description>&lt;P&gt;14 days can get tricky if you don't have continuous dates for each customer... For 14 days, I would&amp;nbsp;suggest using&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/The-As-Of-Table/ba-p/1466130" target="_blank" rel="noopener"&gt;The As Of Table&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2019 19:14:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-of-current-previous-rows/m-p/1590627#M596333</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-06-11T19:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Sum of current + previous rows</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-of-current-previous-rows/m-p/1590938#M596334</link>
      <description>&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;I have created a As-Of calendar for days, see below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="QV 2.png" style="width: 197px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/13596i07A2F5A43EB964B8/image-size/large?v=v2&amp;amp;px=999" role="button" title="QV 2.png" alt="QV 2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If I select the AsOfDate of the 15th of June, I see all the future TEST dates which have a date difference until 14 days.&lt;/P&gt;&lt;P&gt;The applicable rows are also selected in the data table:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="QV 3.png" style="width: 593px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/13597iC1F90E380B231724/image-size/large?v=v2&amp;amp;px=999" role="button" title="QV 3.png" alt="QV 3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But how can I achieve to have the "To be delivered" value of the last row (which is the sum of all the deliveries) to be shown on the first row in this example ?&lt;/P&gt;&lt;P&gt;The next row should show the sum of "To be delivered" until the 30th of June etc.&lt;/P&gt;&lt;P&gt;When I create a separate chart it calculates the sum as I would like to have added to the chart above:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="QV 4.png" style="width: 317px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/13598i85D3D7556FC7C0E3/image-size/large?v=v2&amp;amp;px=999" role="button" title="QV 4.png" alt="QV 4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The following expression is used in the chart:&amp;nbsp;sum({$&amp;lt;DateDiff={"&amp;lt;=14"}&amp;gt;}Delivery)&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 11:37:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-of-current-previous-rows/m-p/1590938#M596334</guid>
      <dc:creator>katwijck</dc:creator>
      <dc:date>2019-06-12T11:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: Sum of current + previous rows</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-of-current-previous-rows/m-p/1590941#M596336</link>
      <description>&lt;P&gt;Would you be able to share the app so that we can see the script and chart?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 11:41:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-of-current-previous-rows/m-p/1590941#M596336</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-06-12T11:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: Sum of current + previous rows</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-of-current-previous-rows/m-p/1590980#M596338</link>
      <description>&lt;P&gt;This could be one solution&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 618px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/13606i039204D786344986/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Dimensions&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Klant nr.
AsOfDate&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expressions&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Amount due
Aggr(RangeSum(Above(Sum(If(TEST = AsOfDate, [Outstanding Amount])),0,RowNo())), [Klant nr.], AsOfDate)+Saldo

To be delivered
Aggr(RangeSum(Above(Sum(If(TEST = AsOfDate, Delivery)),0,RowNo())), [Klant nr.], AsOfDate)

Future
Sum({$&amp;lt;DateDiff={"&amp;lt;=14"}&amp;gt;}Delivery)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 12:37:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-of-current-previous-rows/m-p/1590980#M596338</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-06-12T12:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: Sum of current + previous rows</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-of-current-previous-rows/m-p/1591110#M596340</link>
      <description>Hi Sunny,&lt;BR /&gt;&lt;BR /&gt;It seems to (again) do the trick!&lt;BR /&gt;Thank you very much!&lt;BR /&gt;&lt;BR /&gt;With kind regards,&lt;BR /&gt;&lt;BR /&gt;Martin van der Bent</description>
      <pubDate>Wed, 12 Jun 2019 14:36:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-of-current-previous-rows/m-p/1591110#M596340</guid>
      <dc:creator>katwijck</dc:creator>
      <dc:date>2019-06-12T14:36:30Z</dc:date>
    </item>
  </channel>
</rss>

