<?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: Cummulative Calculation based on condition in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Cummulative-Calculation-based-on-condition/m-p/1026100#M346781</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9pt !important; font-style: inherit; background-color: inherit; font-weight: inherit;"&gt;INPUT:&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;LOAD&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; ID,&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Seq,&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Category,&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;A class="jive-link-thread-small" data-containerid="2051" data-containertype="14" data-objectid="213114" data-objecttype="1" href="https://community.qlik.com/thread/213114"&gt;https://community.qlik.com/thread/213114&lt;/A&gt;&lt;SPAN&gt;]&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;(html, codepage &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; 1252, embedded labels, &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; @1);&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;LOAD&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; *,&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; Tmp1;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;LOAD&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; ID,&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Seq,&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Category,&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount,&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(ID &amp;lt;&amp;gt; previous(ID) &lt;SPAN class="op" style="font-weight: inherit; font-style: inherit; color: #808080; font-size: 9pt !important; background-color: inherit;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; Category=Previous(Category), Amount, Rangesum(&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;Peek(&lt;SPAN style="font-size: 12px;"&gt;Rangesum(Cumulative, Peek(Tmp1))&lt;/SPAN&gt;),-Amount)&lt;/STRONG&gt;&lt;/SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; Cumulative&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;Resident INPUT&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;ORDER&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;BY&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; ID, Seq;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;DROP&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;TABLE&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; INPUT;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peek allows for using functions such as RangeSum and another Peek within it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Apr 2016 13:14:06 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-04-13T13:14:06Z</dc:date>
    <item>
      <title>Cummulative Calculation based on condition</title>
      <link>https://community.qlik.com/t5/QlikView/Cummulative-Calculation-based-on-condition/m-p/1026093#M346774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am stuck in one of the requirement and I am not able to find the right solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellspacing="0" frame="VOID" rules="NONE"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="19" width="65"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;ID&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="65"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;Seq&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="65"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;Category&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="65"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;Amount&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;a&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;100&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;a&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;200&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;3&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;a&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;300&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;4&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;b&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;200&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;5&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;c&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;150&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;6&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;c&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;300&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;7&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;a&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;100&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;8&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;b&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;100&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;9&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;b&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;300&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;10&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;a&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;175&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need output like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellspacing="0" frame="VOID" rules="NONE"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="19" width="65"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;ID&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="65"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;Seq&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="65"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;Category&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="65"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;Amount&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="99"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;Cummulative&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="231"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;a&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;100&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;100&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;a&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;200&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;200&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;3&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;a&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;300&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;300&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;4&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;b&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;200&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;400&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;“(100+200+300)-200”&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;5&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;c&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;150&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;850&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;“(100+200+300+400)-150”&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;6&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;c&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;300&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;300&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;7&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;a&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;100&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;2050&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;“(100+200+300+400+850+300)-100”&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;8&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;b&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;100&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;4400&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;9&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;b&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;300&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;300&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19"&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;10&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;a&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;175&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;8725&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So basically when Category is Same, amount will be same, but when category changed sequentially (eg. Seq=4) , amount should be calculated as (sum of all previous category amount - current category amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope I have explained the logic well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/96544"&gt;gwassenaar&lt;/A&gt;&amp;nbsp; &lt;A href="https://community.qlik.com/qlik-users/15823"&gt;swuehl&lt;/A&gt;‌ &lt;A href="https://community.qlik.com/qlik-users/171708"&gt;sunindia&lt;/A&gt;‌ &lt;A href="https://community.qlik.com/qlik-users/57428"&gt;kush141087&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2016 11:43:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cummulative-Calculation-based-on-condition/m-p/1026093#M346774</guid>
      <dc:creator />
      <dc:date>2016-04-13T11:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Cummulative Calculation based on condition</title>
      <link>https://community.qlik.com/t5/QlikView/Cummulative-Calculation-based-on-condition/m-p/1026094#M346775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is needed in the script or the front end of the application?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2016 12:19:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cummulative-Calculation-based-on-condition/m-p/1026094#M346775</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-13T12:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Cummulative Calculation based on condition</title>
      <link>https://community.qlik.com/t5/QlikView/Cummulative-Calculation-based-on-condition/m-p/1026095#M346776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need this in script&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2016 12:36:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cummulative-Calculation-based-on-condition/m-p/1026095#M346776</guid>
      <dc:creator />
      <dc:date>2016-04-13T12:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Cummulative Calculation based on condition</title>
      <link>https://community.qlik.com/t5/QlikView/Cummulative-Calculation-based-on-condition/m-p/1026096#M346777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe like&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_1460551880693314 jive_text_macro" jivemacro_uid="_1460551880693314"&gt;
&lt;P&gt;INPUT:&lt;/P&gt;
&lt;P&gt;LOAD ID,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Seq,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Category,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount&lt;/P&gt;
&lt;P&gt;FROM&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;A _jive_internal="true" data-containerid="2051" data-containertype="14" data-objectid="213114" data-objecttype="1" href="https://community.qlik.com/thread/213114"&gt;https://community.qlik.com/thread/213114&lt;/A&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;(html, codepage is 1252, embedded labels, table is @1);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;LOAD *,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Rangesum(Cumulative, Peek(Tmp1)) as Tmp1;&lt;/P&gt;
&lt;P&gt;LOAD ID,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Seq,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Category,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(ID &amp;lt;&amp;gt; previous(ID) or Category=Previous(Category), Amount, Rangesum(Peek(Tmp1),-Amount)) as Cumulative&lt;/P&gt;
&lt;P&gt;Resident INPUT&lt;/P&gt;
&lt;P&gt;ORDER BY ID, Seq;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP TABLE INPUT;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: there are some minor differences in the last few lines, but I think the calculations are correct:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE bgcolor="#ffffff" border="1" cellpadding="2" cellspacing="0" style="font-size: 9pt;"&gt;&lt;TBODY&gt;&lt;TR bgcolor="#f5f5f5"&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;ID&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Seq&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Category&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Amount&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Cumulative&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Tmp1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;a&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;100&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;100&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;100&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;a&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;200&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;200&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;300&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;3&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;a&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;300&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;300&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;600&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;4&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;b&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;200&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;400&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1000&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;5&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;c&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;150&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;850&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1850&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;6&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;c&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;300&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;300&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2150&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;7&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;a&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;100&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2050&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;4200&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;8&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;b&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;100&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;4100&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;8300&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;9&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;b&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;300&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;300&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;8600&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;10&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;a&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;175&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;8425&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;17025&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2016 12:51:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cummulative-Calculation-based-on-condition/m-p/1026096#M346777</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-13T12:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: Cummulative Calculation based on condition</title>
      <link>https://community.qlik.com/t5/QlikView/Cummulative-Calculation-based-on-condition/m-p/1026097#M346778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am little bit unsure about your logic when ID change, so instead&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;&amp;nbsp; If(ID &amp;lt;&amp;gt; previous(ID) &lt;/SPAN&gt;&lt;SPAN class="op" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #808080;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt; Category=Previous(Category), ..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;you might want a different logic (I believe my current logic is not correct)? Do you need to look at ID at all?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;&amp;nbsp; If(Recno() = 1 &lt;/SPAN&gt;&lt;SPAN class="op" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #808080;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt; Category=Previous(Category), ...&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2016 13:05:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cummulative-Calculation-based-on-condition/m-p/1026097#M346778</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-13T13:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: Cummulative Calculation based on condition</title>
      <link>https://community.qlik.com/t5/QlikView/Cummulative-Calculation-based-on-condition/m-p/1026098#M346779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So Stefan, preceding load is the key here right, there no way to have accomplished this without the preceding load or do you think it is still possible?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2016 13:07:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cummulative-Calculation-based-on-condition/m-p/1026098#M346779</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-13T13:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Cummulative Calculation based on condition</title>
      <link>https://community.qlik.com/t5/QlikView/Cummulative-Calculation-based-on-condition/m-p/1026099#M346780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I think it should be possible to get everything in one load, by replacing the field reference with the full expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2016 13:11:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cummulative-Calculation-based-on-condition/m-p/1026099#M346780</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-13T13:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: Cummulative Calculation based on condition</title>
      <link>https://community.qlik.com/t5/QlikView/Cummulative-Calculation-based-on-condition/m-p/1026100#M346781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9pt !important; font-style: inherit; background-color: inherit; font-weight: inherit;"&gt;INPUT:&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;LOAD&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; ID,&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Seq,&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Category,&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;A class="jive-link-thread-small" data-containerid="2051" data-containertype="14" data-objectid="213114" data-objecttype="1" href="https://community.qlik.com/thread/213114"&gt;https://community.qlik.com/thread/213114&lt;/A&gt;&lt;SPAN&gt;]&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;(html, codepage &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; 1252, embedded labels, &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; @1);&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;LOAD&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; *,&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; Tmp1;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;LOAD&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; ID,&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Seq,&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Category,&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount,&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(ID &amp;lt;&amp;gt; previous(ID) &lt;SPAN class="op" style="font-weight: inherit; font-style: inherit; color: #808080; font-size: 9pt !important; background-color: inherit;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; Category=Previous(Category), Amount, Rangesum(&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;Peek(&lt;SPAN style="font-size: 12px;"&gt;Rangesum(Cumulative, Peek(Tmp1))&lt;/SPAN&gt;),-Amount)&lt;/STRONG&gt;&lt;/SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; Cumulative&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;Resident INPUT&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;ORDER&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;BY&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; ID, Seq;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;DROP&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;TABLE&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; INPUT;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peek allows for using functions such as RangeSum and another Peek within it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2016 13:14:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cummulative-Calculation-based-on-condition/m-p/1026100#M346781</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-13T13:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: Cummulative Calculation based on condition</title>
      <link>https://community.qlik.com/t5/QlikView/Cummulative-Calculation-based-on-condition/m-p/1026101#M346782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But I guess this won't work because we don't have Tmp1 available within the inner peek. And when I tried this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;INPUT:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD ID, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Seq, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Category, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;A _jive_internal="true" data-containerid="2051" data-containertype="14" data-objectid="213114" data-objecttype="1" href="https://community.qlik.com/thread/213114"&gt;https://community.qlik.com/thread/213114&lt;/A&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(html, codepage is 1252, embedded labels, table is @1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//&amp;nbsp; Rangesum(Cumulative, Peek(Tmp1)) as Tmp1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD ID, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Seq, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Category, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #ff0000;"&gt; Rangesum(Cumulative, Peek(Tmp1)) as Tmp1,&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(ID &amp;lt;&amp;gt; previous(ID) or Category=Previous(Category), Amount, Rangesum(Peek(Tmp1),-Amount)) as Cumulative&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident INPUT&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ORDER BY ID, Seq;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP TABLE INPUT;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again it throw me an error that Cumulative isn't there. So I guess cross referencing seems only possible with a preceding load here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2016 13:17:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cummulative-Calculation-based-on-condition/m-p/1026101#M346782</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-13T13:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: Cummulative Calculation based on condition</title>
      <link>https://community.qlik.com/t5/QlikView/Cummulative-Calculation-based-on-condition/m-p/1026102#M346783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I was considering replacing the preceding load, not getting everything into one field expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD ID, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Seq, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Category, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Recno()=1 or Category=Previous(Category), Amount, Rangesum(Peek(Tmp1),-Amount)) as Cumulative,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Rangesum( If(Recno()=1 or Category=Previous(Category), Amount, Rangesum(Peek(Tmp1),-Amount)), Peek(Tmp1)) as Tmp1&lt;/P&gt;&lt;P&gt;Resident INPUT&lt;/P&gt;&lt;P&gt;ORDER BY ID, Seq;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2016 13:24:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cummulative-Calculation-based-on-condition/m-p/1026102#M346783</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-13T13:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Cummulative Calculation based on condition</title>
      <link>https://community.qlik.com/t5/QlikView/Cummulative-Calculation-based-on-condition/m-p/1026103#M346784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;alternative solution&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Temp1:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;INLINE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[&lt;BR /&gt; ID, Seq, Category, Amount&lt;BR /&gt; 1, 1, a, 100&lt;BR /&gt; 1, 2, a, 200&lt;BR /&gt; 1, 3, a, 300&lt;BR /&gt; 1, 4, b, 200&lt;BR /&gt; 1, 5, c, 150&lt;BR /&gt; 2, 6, c, 300&lt;BR /&gt; 2, 7, a, 100&lt;BR /&gt; 2, 8, b, 100&lt;BR /&gt; 2, 9, b, 300&lt;BR /&gt; 2, 10, a, 175&lt;BR /&gt; ]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt; &lt;BR /&gt; Temp2:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; * ,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;RowNo&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;()=1,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Amount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Category&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Category&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Cum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)+&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Amount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Cum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)+&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Cum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)-&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Amount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Cum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;RowNo&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;()&amp;lt;&amp;gt;1 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Category&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;lt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Category&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Amount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,0) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Deu&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; Temp1;&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; *,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;RowNo&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;()=1,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Cum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Category&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Category&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Cum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Cum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Amount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Cum1&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Temp2;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;DROP&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Table&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Temp1,Temp2;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2016 13:51:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cummulative-Calculation-based-on-condition/m-p/1026103#M346784</guid>
      <dc:creator>perumal_41</dc:creator>
      <dc:date>2016-04-13T13:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: Cummulative Calculation based on condition</title>
      <link>https://community.qlik.com/t5/QlikView/Cummulative-Calculation-based-on-condition/m-p/1026104#M346785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks all.. and specially qlik superhero &lt;A href="https://community.qlik.com/qlik-users/15823"&gt;swuehl&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2016 14:44:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cummulative-Calculation-based-on-condition/m-p/1026104#M346785</guid>
      <dc:creator />
      <dc:date>2016-04-13T14:44:29Z</dc:date>
    </item>
  </channel>
</rss>

