<?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 Dividing accumulating expressions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Dividing-accumulating-expressions/m-p/288985#M1200600</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From the other thread:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;John Witherspoon wrote: Rangesum(above()) should still work. Create separate hidden expressions for the class a and class b balances, then rangesum each over the current row and all above rows. Probably something like this:&lt;BR style="PADDING-LEFT:30px;" /&gt;Class A Balance = sum({&amp;lt;class={'a'}&amp;gt;} Balance) // hidden expression&lt;BR /&gt;Class B Balance = sum({&amp;lt;class={'b'}&amp;gt;} Balance) // hidden expression&lt;BR /&gt;Cash Flow = rangesum(above("Class A Balance"),0,rowno())&lt;BR /&gt; /rangesum(above("Class B Balance"),0,rowno())&lt;BR /&gt;A better approach might be to handle it with data, though. Let's say your first year was 2001:&lt;BR style="PADDING-LEFT:30px;" /&gt;AsOfYear, Year&lt;BR /&gt;2001, 2001&lt;BR /&gt;2002, 2001&lt;BR /&gt;2002, 2002&lt;BR /&gt;2003, 2001&lt;BR /&gt;2003, 2002&lt;BR /&gt;2003, 2003&lt;BR /&gt;etc.&lt;BR /&gt;Use AsOfYear in the chart, and the sums will be a full accumulation (don't set the full accumulation option), and will work when dividing the sums.&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Nov 2010 23:25:17 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2010-11-19T23:25:17Z</dc:date>
    <item>
      <title>Dividing accumulating expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Dividing-accumulating-expressions/m-p/288984#M1200599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have the same problem&lt;/P&gt;&lt;P&gt;I have an expression as follows: its name is "CASH FLOW"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum ( {&amp;lt;class = {a}&amp;gt;} [Balance] / sum ( {&amp;lt;{class = {b}&amp;gt;} [Balance])&lt;/P&gt;&lt;P&gt;when I accumulate = it accumulates the ratios - which is not what I want&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want - "cumulative" sum ( {&amp;lt;class = {a}&amp;gt;} [Balance] / "cumulative" sum ( {&amp;lt;{class = {b}&amp;gt;} [Balance])&lt;/P&gt;&lt;P&gt;The dimension is period i.e. Year 1, 2, 3 etc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Nov 2010 18:30:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dividing-accumulating-expressions/m-p/288984#M1200599</guid>
      <dc:creator />
      <dc:date>2010-11-19T18:30:54Z</dc:date>
    </item>
    <item>
      <title>Dividing accumulating expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Dividing-accumulating-expressions/m-p/288985#M1200600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From the other thread:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;John Witherspoon wrote: Rangesum(above()) should still work. Create separate hidden expressions for the class a and class b balances, then rangesum each over the current row and all above rows. Probably something like this:&lt;BR style="PADDING-LEFT:30px;" /&gt;Class A Balance = sum({&amp;lt;class={'a'}&amp;gt;} Balance) // hidden expression&lt;BR /&gt;Class B Balance = sum({&amp;lt;class={'b'}&amp;gt;} Balance) // hidden expression&lt;BR /&gt;Cash Flow = rangesum(above("Class A Balance"),0,rowno())&lt;BR /&gt; /rangesum(above("Class B Balance"),0,rowno())&lt;BR /&gt;A better approach might be to handle it with data, though. Let's say your first year was 2001:&lt;BR style="PADDING-LEFT:30px;" /&gt;AsOfYear, Year&lt;BR /&gt;2001, 2001&lt;BR /&gt;2002, 2001&lt;BR /&gt;2002, 2002&lt;BR /&gt;2003, 2001&lt;BR /&gt;2003, 2002&lt;BR /&gt;2003, 2003&lt;BR /&gt;etc.&lt;BR /&gt;Use AsOfYear in the chart, and the sums will be a full accumulation (don't set the full accumulation option), and will work when dividing the sums.&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Nov 2010 23:25:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dividing-accumulating-expressions/m-p/288985#M1200600</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-11-19T23:25:17Z</dc:date>
    </item>
  </channel>
</rss>

