<?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 range sum values? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-range-sum-values/m-p/417148#M564805</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One wayof doing what you want is in the attached qvw file. &lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 12 Jan 2013 00:19:46 GMT</pubDate>
    <dc:creator>nagaiank</dc:creator>
    <dc:date>2013-01-12T00:19:46Z</dc:date>
    <item>
      <title>How to range sum values?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-range-sum-values/m-p/417147#M564804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How to sum values per cut-off?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say, I have this list:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" height="160" style="width: 225px; border: 1px solid rgb(0, 0, 0); height: 160px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Amount&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/1/2013&lt;/TD&gt;&lt;TD&gt;500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/3/2013&lt;/TD&gt;&lt;TD&gt;400&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/4/2013&lt;/TD&gt;&lt;TD&gt;300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/9/2013&lt;/TD&gt;&lt;TD&gt;600&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/10/2013&lt;/TD&gt;&lt;TD&gt;1,000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/12/2013&lt;/TD&gt;&lt;TD&gt;250&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I get the following values, if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(1) When my date is 1/1/2013, the answer should be 500&lt;/P&gt;&lt;P&gt;(2) When date selected is 1/2/2013, the answer is still 500&lt;/P&gt;&lt;P&gt;(3) When date is 1/3/2013, the answer is now 900, because you should sum the previous amount&lt;/P&gt;&lt;P&gt;(4) When date is 1/4/2013, the answer is now 1,200 - because you should always sum previous amount&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so on and so forth.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any one can help? Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jan 2013 23:49:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-range-sum-values/m-p/417147#M564804</guid>
      <dc:creator />
      <dc:date>2013-01-11T23:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to range sum values?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-range-sum-values/m-p/417148#M564805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One wayof doing what you want is in the attached qvw file. &lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Jan 2013 00:19:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-range-sum-values/m-p/417148#M564805</guid>
      <dc:creator>nagaiank</dc:creator>
      <dc:date>2013-01-12T00:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to range sum values?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-range-sum-values/m-p/417149#M564806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you also do that in script? Because I need to fix it, it should be that, regardless of selecting dates, the rangesum will always be same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" height="160" style="background-color: #ffffff; border: 1px solid #000000; margin: 1px 0; padding: 3px; color: #737373; font-family: Arial;"&gt;&lt;TBODY&gt;&lt;TR style="border: 0px;"&gt;&lt;TH align="center" style="border: 1px solid #000000; background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="border: 1px solid #000000; background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Amount&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="border: 1px solid #000000; background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #000000; font-size: 14pt;"&gt;&lt;STRONG&gt;RANGESUM&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR style="border: 0px;"&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px;"&gt;1/1/2013&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px;"&gt;500&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;500&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px;"&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px;"&gt;1/3/2013&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px;"&gt;400&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;900&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px;"&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px;"&gt;1/4/2013&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px;"&gt;300&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;1,200&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px;"&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px;"&gt;1/9/2013&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px;"&gt;600&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;1,800&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px;"&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px;"&gt;1/10/2013&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px;"&gt;1,000&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;2,800&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px;"&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px;"&gt;1/12/2013&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px;"&gt;250&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;3,050&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;So When I select only 1/3/2013, then RANGESUM will always be &lt;SPAN style="color: #ff0000;"&gt;900 &lt;/SPAN&gt;and will never be changed to &lt;SPAN style="color: #ff0000;"&gt;400&lt;/SPAN&gt;. Please help me. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Jan 2013 01:04:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-range-sum-values/m-p/417149#M564806</guid>
      <dc:creator />
      <dc:date>2013-01-12T01:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to range sum values?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-range-sum-values/m-p/417150#M564807</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;In order to make a full accumulation in the script first you need to order the table by the date, after that you can use de peek function, this function returns the previous record read of a field, so the script should be something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load Date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; peek('Amount') + Amount as AmountAccum&lt;/P&gt;&lt;P&gt;from OrderTable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Jan 2013 01:41:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-range-sum-values/m-p/417150#M564807</guid>
      <dc:creator />
      <dc:date>2013-01-12T01:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to range sum values?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-range-sum-values/m-p/417151#M564808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have modified the application to calculate the cumulaive amount in the script so that the date selection will not have any effect on the cumulative value. Hope this meets your needs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Jan 2013 16:07:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-range-sum-values/m-p/417151#M564808</guid>
      <dc:creator>nagaiank</dc:creator>
      <dc:date>2013-01-13T16:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to range sum values?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-range-sum-values/m-p/417152#M564809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks krishnamoorthy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is a great help. Bravo!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2013 01:06:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-range-sum-values/m-p/417152#M564809</guid>
      <dc:creator />
      <dc:date>2013-01-14T01:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to range sum values?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-range-sum-values/m-p/417153#M564810</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;Can you help me getting the accumulation for this on the script? I can't able to do it using/referencing your latest created QVW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached file is the sample file, it has 3 TEST CODES, so each should have different accumulations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Accumulate only PRINCIPAL. No need to accumulate INTEREST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also try RANGESUM if it works. Thanks for the help in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2013 03:09:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-range-sum-values/m-p/417153#M564810</guid>
      <dc:creator />
      <dc:date>2013-01-14T03:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to range sum values?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-range-sum-values/m-p/417154#M564811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;rangesum(above(sum(Amount)&lt;/P&gt;&lt;P&gt;or you can use this expression if there is date condition like you only commulate the amount of 2012..not 2011&lt;/P&gt;&lt;P&gt;then try this&lt;/P&gt;&lt;P&gt;rangesum(above(sum(Amount),0,rowno()))&lt;/P&gt;&lt;P&gt;hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2013 06:53:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-range-sum-values/m-p/417154#M564811</guid>
      <dc:creator>er_mohit</dc:creator>
      <dc:date>2013-01-14T06:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to range sum values?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-range-sum-values/m-p/417155#M564812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are fine, Please flag the Correct answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or else create one more expression with Sum(Amount) and then try to put that expression on the left of down Accumulation and please choose the Full accumulation then you will get as per your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please close this thread so that Freshers can easily understood?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2016 08:27:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-range-sum-values/m-p/417155#M564812</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2016-07-20T08:27:43Z</dc:date>
    </item>
  </channel>
</rss>

