<?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: Cumulative sum in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Cumulative-sum/m-p/429137#M561429</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;PFA file, hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Apr 2013 11:05:48 GMT</pubDate>
    <dc:creator>jagan</dc:creator>
    <dc:date>2013-04-08T11:05:48Z</dc:date>
    <item>
      <title>Cumulative sum</title>
      <link>https://community.qlik.com/t5/QlikView/Cumulative-sum/m-p/429134#M561426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some difficulties for calculating the cumulative sum in an expression to be used in a bar chart. I need the same a result as the "full accumulative" feature in the bar chart cumulative option but in the expression. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need it in the expression because it must be devided by another field which must not be accumulative.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my scenario. I have the following chart :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="37020" class="jive-image-thumbnail jive-image" onclick="" alt="cumulative revenue.png" src="/legacyfs/online/37020_cumulative revenue.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is simply obtained with a Sum(Revenue) and using the full accumulative feature. The revenue of march 2011 for the blue cohort is the accumulative revenue (jan + feb + march).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that I need the devide or substract this accumulative revenue by the cohort's Cost of Acquisition wich must not be accumulative.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, the CAC of the blue cohort is 2 millions, I should have : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in January &lt;SPAN style="font-size: 10pt;"&gt;2 millions - January revenue&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;in Fev 2 millions - (January + Feb revenue)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;In March 2 millions - (January + Feb + March revenue)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;And so on&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Just one part of the expression (the revenue) must be accumulative.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Any idea how to obtain that ? &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Apr 2013 12:00:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cumulative-sum/m-p/429134#M561426</guid>
      <dc:creator />
      <dc:date>2013-04-06T12:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative sum</title>
      <link>https://community.qlik.com/t5/QlikView/Cumulative-sum/m-p/429135#M561427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM style="font-family: trebuchet ms,geneva;"&gt;Hi,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: trebuchet ms,geneva;"&gt;It will great if you can post your sample QVW. However, you should be looking for &lt;SPAN style="color: #000080;"&gt;&lt;STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt;RangeSum()&lt;/SPAN&gt; &lt;/STRONG&gt;&lt;/SPAN&gt;&amp;amp; &lt;SPAN style="color: #000080;"&gt;&lt;STRONG&gt;Above()&lt;/STRONG&gt;&lt;/SPAN&gt; functions to calculate the accumulative sums. &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: trebuchet ms,geneva;"&gt;I hope this helps!&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: trebuchet ms,geneva;"&gt;Cheers,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: trebuchet ms,geneva;"&gt;DV&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: trebuchet ms,geneva;"&gt;&lt;A href="http://www.QlikShare.com"&gt;www.QlikShare.com&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Apr 2013 23:53:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cumulative-sum/m-p/429135#M561427</guid>
      <dc:creator>IAMDV</dc:creator>
      <dc:date>2013-04-06T23:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative sum</title>
      <link>https://community.qlik.com/t5/QlikView/Cumulative-sum/m-p/429136#M561428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are using multiple dimensions ( I&amp;nbsp; assume they are named liked MONTH and COHORTE), so you might need to additionally use advanced aggregation to get your column segments for the accumulation using above() right, maybe along these lines:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=aggr( rangesum(above( sum(REVENUE), 0, rowno() )), COHORTE, MONTH)&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: One more thing, if you are using the advanced aggregation (aggr() function), you'll need to ensure, that MONTH field values load order is chronological ascending, e.g. by loading a master calendar first. The aggr() function's dimension values will always be ordered in load order (not regarding any order you may define for the chart).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Apr 2013 23:35:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cumulative-sum/m-p/429136#M561428</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-04-07T23:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative sum</title>
      <link>https://community.qlik.com/t5/QlikView/Cumulative-sum/m-p/429137#M561429</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;PFA file, hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2013 11:05:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cumulative-sum/m-p/429137#M561429</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2013-04-08T11:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative sum</title>
      <link>https://community.qlik.com/t5/QlikView/Cumulative-sum/m-p/429138#M561430</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;I'm trying with RangeSum(Above(Sum(REVENUE),0,RowNo())). The problem is that this fonction depend on the sort order, we can figure it in these two tables :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="37168" class="jive-image-thumbnail jive-image" onclick="" alt="cumSum1.png" src="https://community.qlik.com/legacyfs/online/37168_cumSum1.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="37169" class="jive-image-thumbnail jive-image" onclick="" alt="cumSum2.png" src="https://community.qlik.com/legacyfs/online/37169_cumSum2.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first one is obtained by changing the sort order of the columns and the result is OK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second is the original table obtained from the chart. The problem is that I cannot change the sort order of columns in the chart. So I need an expression where the rowno is obtained from the following sort order : COHORT, MONTH&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2013 12:07:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cumulative-sum/m-p/429138#M561430</guid>
      <dc:creator />
      <dc:date>2013-04-08T12:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative sum</title>
      <link>https://community.qlik.com/t5/QlikView/Cumulative-sum/m-p/429139#M561431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot swuehl, that worked when changing load order. Unfortunately I can't choose your answer as best answer because I can't loggin with the previous account !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 07:55:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cumulative-sum/m-p/429139#M561431</guid>
      <dc:creator />
      <dc:date>2013-04-09T07:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative sum</title>
      <link>https://community.qlik.com/t5/QlikView/Cumulative-sum/m-p/429140#M561432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Deepak,&lt;/P&gt;&lt;P&gt;This is with regard to the Custom OnClearAll document even in Qlikview at&lt;A href="http://qlikshare.com/856" rel="nofollow"&gt;http://qlikshare.com/856&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried the similar function in my file but I am not able to implement that. The function is exactly written the same way as you have been. It works fine till the concat level but when I go for the the $ expansion, it cripples.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you provide me with some reasoning for this. Attached is&amp;nbsp; qvw file explaining the situation in the sky blue text box. The Schema is pretty simple with just two fields over there. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function I am using is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=$(=concat(DISTINCT ‘GetSelectedCount(‘&amp;amp; $Field &amp;amp; ‘)’, ‘ + ‘))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ajit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Apr 2013 18:29:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cumulative-sum/m-p/429140#M561432</guid>
      <dc:creator />
      <dc:date>2013-04-17T18:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative sum</title>
      <link>https://community.qlik.com/t5/QlikView/Cumulative-sum/m-p/429141#M561433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;Hi Ajit,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;Sorry for the delayed response. You need to use the square brackets.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: 'trebuchet ms', geneva; background-color: #ffffff;"&gt;=$(=concat(DISTINCT ‘GetSelectedCount(&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;‘&amp;amp; $Field &amp;amp; ‘&lt;STRONG style="color: #ff0000;"&gt;]&lt;/STRONG&gt;)’, ‘ + ‘))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: 'trebuchet ms', geneva; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;I hope this helps! Also, if you are using "Always one value selected" then you need to tweak the logic in the expression. It works great for me.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;DV&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;www.QlikShare.com&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: 'trebuchet ms', geneva; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jun 2013 10:40:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cumulative-sum/m-p/429141#M561433</guid>
      <dc:creator>IAMDV</dc:creator>
      <dc:date>2013-06-28T10:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative sum</title>
      <link>https://community.qlik.com/t5/QlikView/Cumulative-sum/m-p/429142#M561434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2015 06:51:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cumulative-sum/m-p/429142#M561434</guid>
      <dc:creator />
      <dc:date>2015-05-21T06:51:39Z</dc:date>
    </item>
  </channel>
</rss>

