<?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: Accumulation in Qlikview in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Accumulation-in-Qlikview/m-p/845292#M296805</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I chime with Swuehl reply.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Jun 2015 10:52:15 GMT</pubDate>
    <dc:creator>hariprasadqv</dc:creator>
    <dc:date>2015-06-08T10:52:15Z</dc:date>
    <item>
      <title>Accumulation in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulation-in-Qlikview/m-p/845289#M296802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per my requirement i need to do an accumulation as explained below.Which is kind of a negative accumulation.&lt;/P&gt;&lt;P&gt;The first value on the second column is sum of the values in the first column.And then the values are getting subtracted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="193"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="64"&gt;Data&lt;/TD&gt;&lt;TD width="129"&gt;After Accumulation&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;1100&lt;/TD&gt;&lt;TD align="right"&gt;2400&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;200&lt;/TD&gt;&lt;TD align="right"&gt;2200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;400&lt;/TD&gt;&lt;TD align="right"&gt;1800&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;200&lt;/TD&gt;&lt;TD align="right"&gt;1600&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;500&lt;/TD&gt;&lt;TD align="right"&gt;1100&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Any help would be highly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2015 10:00:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulation-in-Qlikview/m-p/845289#M296802</guid>
      <dc:creator />
      <dc:date>2015-06-08T10:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulation in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulation-in-Qlikview/m-p/845290#M296803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe something like&lt;/P&gt;&lt;P&gt;=sum(TOTAL Data) - rangesum(above( sum(Data),0,rowno() ))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit:&lt;/P&gt;&lt;P&gt;Or, to exclude the very first line from the rangesum, maybe&lt;/P&gt;&lt;P&gt;sum(TOTAL Data) - rangesum(above( sum(Data),0,rowno()-1 ))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2015 10:02:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulation-in-Qlikview/m-p/845290#M296803</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-08T10:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulation in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulation-in-Qlikview/m-p/845291#M296804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you share the data with more information&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2015 10:08:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulation-in-Qlikview/m-p/845291#M296804</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2015-06-08T10:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulation in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulation-in-Qlikview/m-p/845292#M296805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I chime with Swuehl reply.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2015 10:52:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulation-in-Qlikview/m-p/845292#M296805</guid>
      <dc:creator>hariprasadqv</dc:creator>
      <dc:date>2015-06-08T10:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulation in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulation-in-Qlikview/m-p/845293#M296806</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;Try like this&lt;/P&gt;&lt;P&gt;Sum(TOTAL Datas)- rangesum(above( sum(Datas),0,rowno()-1 ))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2015 10:58:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulation-in-Qlikview/m-p/845293#M296806</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2015-06-08T10:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulation in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulation-in-Qlikview/m-p/845294#M296807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From the test data you provide there must be an opening balance which seems to be the number 2400 in the top. So I took this as an opening balance and then the rest is just a matter of subtracting - calculating all the current balances for each row. The expression I would suggest looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add a row ID in your load script and then create a Straight Table with an expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This expression (column ) should have the label Balance - hence the reference to [Balance] in the expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: #3366ff;"&gt;If&lt;/SPAN&gt;( &lt;SPAN style="color: #3366ff;"&gt;IsNull&lt;/SPAN&gt;( &lt;SPAN style="color: #3366ff;"&gt;Above&lt;/SPAN&gt;( [Balance] ) ) , 2400 , &lt;SPAN style="color: #3366ff;"&gt;Above&lt;/SPAN&gt;( [Balance] ) - [Data] )&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The IsNull(Above([Balance])), 2400&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; is to establish the opening balance - what follows is the calculation for each row afterwards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NOTES ON PERFORMANCE:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I started out with a different approach than most of what was suggested here. But when I was about to post I saw the other solution by swuehl which is absolutely valid although with the slight fix that Mayil suggested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My suggestion however avoided the use of Above which recalculate for each row the total sum of all rows. I found that very calculation intensive so I went for a simple sum/substraction. But then I got curious how they would compare in actual usage. Would QlikView be able to be smart so the calculations were performing equally well... I made a more comprehensive test-data to be able to measure the difference. And my simple test absolutely shows that recalculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So using the expression I suggest and having a table of 10000 rows it will calculate in &lt;STRONG&gt;120 ms&lt;/STRONG&gt; on my laptop. Using the expression which use the Above( ... , ... , ....)&amp;nbsp; three parameter version it use &lt;STRONG&gt;20000 ms&lt;/STRONG&gt; for the same calculation. You might say that since you only have a few rows in the calculation you might not notice a difference. And that is correct unless you make it into a habit of using calculation intensive functions without searching for a less calculation intensive calculation. In the end you will end up with a lot of applications that consume a lot of CPU - possibly orders of magnitude more than they need to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have seen that happen too many times to not point out the culprit when I encounter it. What might work quickly might end up not scaling at all - have a close look at your expressions before going into production and you might need a lot of data being calculated that it all matters how you construct your expressions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2015 13:48:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulation-in-Qlikview/m-p/845294#M296807</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-06-08T13:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulation in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulation-in-Qlikview/m-p/845295#M296808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can use the below function for this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rangesum(sum(Data),Below([After Accumulation]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see the attached example&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2015 14:38:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulation-in-Qlikview/m-p/845295#M296808</guid>
      <dc:creator>ramoncova06</dc:creator>
      <dc:date>2015-06-08T14:38:59Z</dc:date>
    </item>
  </channel>
</rss>

