<?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 Accumulation in Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Accumulation-in-Script/m-p/319970#M1197515</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Melisa,&lt;/P&gt;&lt;P&gt;Check this script as an example of getting month accumulation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Table:LOAD Chr(64 + Ceil(Rand() * 2)) AS Code, Month(Date('01/01/2011') + Ceil(Rand() * 90)) AS Month, Ceil(Rand() * 1000) AS AmountAUTOGENERATE 10; TableStep2:NOCONCATENATE LOAD *RESIDENT TableORDER BY Code, Month; DROP TABLE Table; AcumTable:LOAD *, If(Code = Previous(Code), If(Month = Previous(Month), RangeSum(Amount, Peek('MonthAcum')), Amount), Amount) AS MonthAcumRESIDENT TableStep2; DROP TABLE TableStep2;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;In the other case -I may have missed something- how can you non accumulate data? I mean, if you have data only for January, is there any field less than month you can use to divide your amounts into (date, week)? Otherwise, how would you split that amount?&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Apr 2011 14:35:31 GMT</pubDate>
    <dc:creator>Miguel_Angel_Baeyens</dc:creator>
    <dc:date>2011-04-11T14:35:31Z</dc:date>
    <item>
      <title>Accumulation in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulation-in-Script/m-p/319965#M1197510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a table with expenses and dates.&lt;/P&gt;&lt;P&gt;How can I accumulate the data by months?&lt;/P&gt;&lt;P&gt;For exemple we have a table with the data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 113pt; border-collapse: collapse;" width="151"&gt;&lt;COLGROUP&gt;&lt;COL style="width: 65pt; mso-width-source: userset; mso-width-alt: 3181;" width="87" /&gt;&lt;COL style="width: 48pt;" width="64" /&gt;&lt;/COLGROUP&gt;&lt;TBODY&gt;&lt;TR height="20" style="height: 15pt;"&gt;&lt;TD class="xl63" height="20" style="background-color: transparent; width: 65pt; height: 15pt; border: windowtext 0.5pt solid;" width="87"&gt;dd/mm/yyyy&lt;/TD&gt;&lt;TD class="xl63" style="border-bottom: windowtext 0.5pt solid; border-left: windowtext; background-color: transparent; width: 48pt; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid;" width="64"&gt;expenses&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="20" style="height: 15pt;"&gt;&lt;TD class="xl63" height="20" style="border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; background-color: transparent; height: 15pt; border-top: windowtext; border-right: windowtext 0.5pt solid;"&gt;01/01/2010&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-bottom: windowtext 0.5pt solid; border-left: windowtext; background-color: transparent; border-top: windowtext; border-right: windowtext 0.5pt solid;"&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="20" style="height: 15pt;"&gt;&lt;TD class="xl63" height="20" style="border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; background-color: transparent; height: 15pt; border-top: windowtext; border-right: windowtext 0.5pt solid;"&gt;02/01/2010&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-bottom: windowtext 0.5pt solid; border-left: windowtext; background-color: transparent; border-top: windowtext; border-right: windowtext 0.5pt solid;"&gt;55&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="20" style="height: 15pt;"&gt;&lt;TD class="xl63" height="20" style="border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; background-color: transparent; height: 15pt; border-top: windowtext; border-right: windowtext 0.5pt solid;"&gt;15/01/2010&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-bottom: windowtext 0.5pt solid; border-left: windowtext; background-color: transparent; border-top: windowtext; border-right: windowtext 0.5pt solid;"&gt;60&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="20" style="height: 15pt;"&gt;&lt;TD class="xl63" height="20" style="border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; background-color: transparent; height: 15pt; border-top: windowtext; border-right: windowtext 0.5pt solid;"&gt;20/01/2010&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-bottom: windowtext 0.5pt solid; border-left: windowtext; background-color: transparent; border-top: windowtext; border-right: windowtext 0.5pt solid;"&gt;45&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="20" style="height: 15pt;"&gt;&lt;TD class="xl63" height="20" style="border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; background-color: transparent; height: 15pt; border-top: windowtext; border-right: windowtext 0.5pt solid;"&gt;03/02/2010&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-bottom: windowtext 0.5pt solid; border-left: windowtext; background-color: transparent; border-top: windowtext; border-right: windowtext 0.5pt solid;"&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="20" style="height: 15pt;"&gt;&lt;TD class="xl63" height="20" style="border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; background-color: transparent; height: 15pt; border-top: windowtext; border-right: windowtext 0.5pt solid;"&gt;27/02/2010&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-bottom: windowtext 0.5pt solid; border-left: windowtext; background-color: transparent; border-top: windowtext; border-right: windowtext 0.5pt solid;"&gt;55&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="20" style="height: 15pt;"&gt;&lt;TD class="xl63" height="20" style="border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; background-color: transparent; height: 15pt; border-top: windowtext; border-right: windowtext 0.5pt solid;"&gt;09/03/2010&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-bottom: windowtext 0.5pt solid; border-left: windowtext; background-color: transparent; border-top: windowtext; border-right: windowtext 0.5pt solid;"&gt;70&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="20" style="height: 15pt;"&gt;&lt;TD class="xl63" height="20" style="border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; background-color: transparent; height: 15pt; border-top: windowtext; border-right: windowtext 0.5pt solid;"&gt;18/03/2010&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-bottom: windowtext 0.5pt solid; border-left: windowtext; background-color: transparent; border-top: windowtext; border-right: windowtext 0.5pt solid;"&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;If I select 'Jan' I get 210, If I select 'Feb' i get 70, If I select 'Mar' I get 100.&lt;/P&gt;&lt;P&gt;What i want is, if I select 'Jan' I get 210, If I select 'Feb' i get 280, If I select 'Mar' I get 380.&lt;/P&gt;&lt;P&gt;How can we do this in QV in the Script?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 10:46:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulation-in-Script/m-p/319965#M1197510</guid>
      <dc:creator />
      <dc:date>2011-04-11T10:46:18Z</dc:date>
    </item>
    <item>
      <title>Accumulation in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulation-in-Script/m-p/319966#M1197511</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;You can achieve the same by using peek() statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 10:50:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulation-in-Script/m-p/319966#M1197511</guid>
      <dc:creator />
      <dc:date>2011-04-11T10:50:26Z</dc:date>
    </item>
    <item>
      <title>Accumulation in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulation-in-Script/m-p/319967#M1197512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;But could you please sow this expression in an example?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 11:03:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulation-in-Script/m-p/319967#M1197512</guid>
      <dc:creator />
      <dc:date>2011-04-11T11:03:10Z</dc:date>
    </item>
    <item>
      <title>Accumulation in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulation-in-Script/m-p/319968#M1197513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please find the attached app, hope this will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 13:24:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulation-in-Script/m-p/319968#M1197513</guid>
      <dc:creator />
      <dc:date>2011-04-11T13:24:03Z</dc:date>
    </item>
    <item>
      <title>Accumulation in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulation-in-Script/m-p/319969#M1197514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Upendra11&lt;/P&gt;&lt;P&gt;Thank you a lot. I got what the peek() expression serves for.&lt;/P&gt;&lt;P&gt;Sorry, but in this exemple date is always a column. But in my practice I may use the month(date) expression and use it as row (because there are a lot of other fields (account, unit, function) to be presented in columns)... May be there is som other way out to accumulate the data on the date basis?&lt;/P&gt;&lt;P&gt;Besides, I just remembered that I have a file, where vice versa I have accumulated data. For example, I get general ledger for January with transactions made in January. In February I get another General Ledger with tranasction from January + Februray. Accumulated. But I need a nonaccumulated data. So from the Feb's Gen Ledger I select the transaction I already had in Janury. May be there is an easier way to do this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 13:45:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulation-in-Script/m-p/319969#M1197514</guid>
      <dc:creator />
      <dc:date>2011-04-11T13:45:48Z</dc:date>
    </item>
    <item>
      <title>Accumulation in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulation-in-Script/m-p/319970#M1197515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Melisa,&lt;/P&gt;&lt;P&gt;Check this script as an example of getting month accumulation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Table:LOAD Chr(64 + Ceil(Rand() * 2)) AS Code, Month(Date('01/01/2011') + Ceil(Rand() * 90)) AS Month, Ceil(Rand() * 1000) AS AmountAUTOGENERATE 10; TableStep2:NOCONCATENATE LOAD *RESIDENT TableORDER BY Code, Month; DROP TABLE Table; AcumTable:LOAD *, If(Code = Previous(Code), If(Month = Previous(Month), RangeSum(Amount, Peek('MonthAcum')), Amount), Amount) AS MonthAcumRESIDENT TableStep2; DROP TABLE TableStep2;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;In the other case -I may have missed something- how can you non accumulate data? I mean, if you have data only for January, is there any field less than month you can use to divide your amounts into (date, week)? Otherwise, how would you split that amount?&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 14:35:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulation-in-Script/m-p/319970#M1197515</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-04-11T14:35:31Z</dc:date>
    </item>
    <item>
      <title>Accumulation in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulation-in-Script/m-p/319971#M1197519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Miguel.&lt;/P&gt;&lt;P&gt;I need some time to understand the expressions you use, so I can tell if it helps only tomorrow. But thank you a lot fir your answer!&lt;/P&gt;&lt;P&gt;Speaking about the another case, ofcourse in January we have the data only for Janury. But in Februry we have for both for Jan and for Feb, so we need to make Feb-Jan=the data only fo Feb. But it is very unconvinient for the next 12 Months&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 14:55:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulation-in-Script/m-p/319971#M1197519</guid>
      <dc:creator />
      <dc:date>2011-04-11T14:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulation in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulation-in-Script/m-p/319972#M1197521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Melisa,&lt;/P&gt;&lt;P&gt;Using the same Previous() and Peek() functions you can do something similar, but instead of adding, substracting this current month's amount to previous month amount&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Table:&lt;/P&gt;&lt;P&gt;LOAD IterNo() AS Month, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ceil(Rand() * 1000) AS Amount&lt;/P&gt;&lt;P&gt;AUTOGENERATE 1 WHILE IterNo() &amp;lt; 13; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TableStep2:&lt;/P&gt;&lt;P&gt;NOCONCATENATE LOAD *&lt;/P&gt;&lt;P&gt;RESIDENT Table&lt;/P&gt;&lt;P&gt;ORDER BY Month; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE Table; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AcumTable:&lt;/P&gt;&lt;P&gt;LOAD *, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Month &amp;gt; Previous(Month), RangeSum(Amount, Peek('MonthAcum') * -1), Amount) AS MonthAcum&lt;/P&gt;&lt;P&gt;RESIDENT TableStep2; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE TableStep2;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The idea is that Amount in the first table has the value for this and previous months (which in the example above is not correct, since amounts are randomized) and if that the current record's month is greater than previous record, subtract to this month's amount, previous' amount.&lt;/P&gt;&lt;P&gt;With more sensible data, I think it's worth trying.&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 15:19:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulation-in-Script/m-p/319972#M1197521</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-04-11T15:19:41Z</dc:date>
    </item>
    <item>
      <title>Accumulation in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulation-in-Script/m-p/319973#M1197522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Miguel.&lt;/P&gt;&lt;P&gt;Thank you very much, yes that works.&lt;/P&gt;&lt;P&gt;But here we have&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width:137pt;border-collapse:collapse;" width="182"&gt;&lt;COLGROUP&gt;&lt;COL style="width:51pt;mso-width-source:userset;mso-width-alt:2486;mso-outline-parent:collapsed;" width="68" /&gt;&lt;COL style="width:31pt;mso-width-source:userset;mso-width-alt:1499;mso-outline-parent:collapsed;" width="41" /&gt;&lt;COL style="width:55pt;mso-width-source:userset;mso-width-alt:2669;mso-outline-parent:collapsed;" width="73" /&gt;&lt;/COLGROUP&gt;&lt;TBODY&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD class="xl63" height="17" style="background-color:#ebebeb;width:51pt;height:12.75pt;border:gainsboro 0.5pt solid;" width="68"&gt;&lt;STRONG&gt;Amount&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl63" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:#ebebeb;width:31pt;border-top:gainsboro 0.5pt solid;border-right:gainsboro 0.5pt solid;" width="41"&gt;&lt;STRONG&gt;Month&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl63" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:#ebebeb;width:55pt;border-top:gainsboro 0.5pt solid;border-right:gainsboro 0.5pt solid;" width="73"&gt;&lt;STRONG&gt;MonthAcum&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl64" height="17" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro 0.5pt solid;background-color:white;height:12.75pt;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;214&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:white;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:white;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;214&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl66" height="17" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro 0.5pt solid;background-color:whitesmoke;height:12.75pt;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;866&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:whitesmoke;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:whitesmoke;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;652&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl64" height="17" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro 0.5pt solid;background-color:white;height:12.75pt;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;819&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:white;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:white;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;167&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl66" height="17" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro 0.5pt solid;background-color:whitesmoke;height:12.75pt;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;655&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:whitesmoke;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:whitesmoke;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;488&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl64" height="17" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro 0.5pt solid;background-color:white;height:12.75pt;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;395&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:white;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;5&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:white;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;-93&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl66" height="17" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro 0.5pt solid;background-color:whitesmoke;height:12.75pt;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;751&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:whitesmoke;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;6&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:whitesmoke;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;844&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl64" height="17" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro 0.5pt solid;background-color:white;height:12.75pt;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;926&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:white;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;7&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:white;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;82&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl66" height="17" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro 0.5pt solid;background-color:whitesmoke;height:12.75pt;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;261&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:whitesmoke;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;8&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:whitesmoke;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;179&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl64" height="17" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro 0.5pt solid;background-color:white;height:12.75pt;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;346&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:white;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;9&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:white;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;167&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl66" height="17" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro 0.5pt solid;background-color:whitesmoke;height:12.75pt;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;576&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:whitesmoke;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;10&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:whitesmoke;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;409&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl64" height="17" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro 0.5pt solid;background-color:white;height:12.75pt;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;646&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:white;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;11&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:white;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;237&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl66" height="17" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro 0.5pt solid;background-color:whitesmoke;height:12.75pt;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;668&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:whitesmoke;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;12&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:whitesmoke;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;431&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;And what i need is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width:144pt;border-collapse:collapse;" width="192"&gt;&lt;COLGROUP&gt;&lt;COL span="3" style="width:48pt;" width="64" /&gt;&lt;/COLGROUP&gt;&lt;TBODY&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD class="xl63" height="17" style="background-color:#ebebeb;width:48pt;height:12.75pt;border:gainsboro 0.5pt solid;" width="64"&gt;&lt;STRONG&gt;Amount&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl63" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:#ebebeb;width:48pt;border-top:gainsboro 0.5pt solid;border-right:gainsboro 0.5pt solid;" width="64"&gt;&lt;STRONG&gt;Month&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl63" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:#ebebeb;width:48pt;border-top:gainsboro 0.5pt solid;border-right:gainsboro 0.5pt solid;" width="64"&gt;&lt;STRONG&gt;MonthAcum&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl64" height="17" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro 0.5pt solid;background-color:white;height:12.75pt;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;214&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:white;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:white;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;214&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl66" height="17" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro 0.5pt solid;background-color:whitesmoke;height:12.75pt;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;1080&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:whitesmoke;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:whitesmoke;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;866&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl66" height="17" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro 0.5pt solid;background-color:whitesmoke;height:12.75pt;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;1899&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:white;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:white;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;819&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl66" height="17" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro 0.5pt solid;background-color:whitesmoke;height:12.75pt;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;2554&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:whitesmoke;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:whitesmoke;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;655&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl66" height="17" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro 0.5pt solid;background-color:whitesmoke;height:12.75pt;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;2949&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:white;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;5&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:white;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;395&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl66" height="17" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro 0.5pt solid;background-color:whitesmoke;height:12.75pt;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;3700&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:whitesmoke;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;6&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:whitesmoke;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;751&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl66" height="17" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro 0.5pt solid;background-color:whitesmoke;height:12.75pt;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;4626&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:white;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;7&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:white;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;926&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl66" height="17" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro 0.5pt solid;background-color:whitesmoke;height:12.75pt;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;4887&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:whitesmoke;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;8&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:whitesmoke;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;261&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl66" height="17" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro 0.5pt solid;background-color:whitesmoke;height:12.75pt;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;5233&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:white;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;9&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:white;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;346&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl66" height="17" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro 0.5pt solid;background-color:whitesmoke;height:12.75pt;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;5809&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:whitesmoke;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;10&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:whitesmoke;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;576&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl66" height="17" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro 0.5pt solid;background-color:whitesmoke;height:12.75pt;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;6455&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:white;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;11&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:white;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;646&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:12.75pt;"&gt;&lt;TD align="right" class="xl66" height="17" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro 0.5pt solid;background-color:whitesmoke;height:12.75pt;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;7123&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:whitesmoke;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;12&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-bottom:gainsboro 0.5pt solid;border-left:gainsboro;background-color:whitesmoke;border-top:gainsboro;border-right:gainsboro 0.5pt solid;"&gt;668&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;May be that is even easier...? Can we do this with the help of PEEK()?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2011 06:37:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulation-in-Script/m-p/319973#M1197522</guid>
      <dc:creator />
      <dc:date>2011-04-12T06:37:59Z</dc:date>
    </item>
    <item>
      <title>Accumulation in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulation-in-Script/m-p/319974#M1197525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Melisa,&lt;/P&gt;&lt;P&gt;Yes, you can do it with peek. As Miguel suggested (it might need a basic modification, but the logic is surely fine.). you can find one of my post helpful:&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/forums/t/43113.aspx"&gt;http://community.qlik.com/forums/t/43113.aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards, tresesco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2011 06:58:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulation-in-Script/m-p/319974#M1197525</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2011-04-12T06:58:08Z</dc:date>
    </item>
    <item>
      <title>Accumulation in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulation-in-Script/m-p/319975#M1197526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Melisa,&lt;/P&gt;&lt;P&gt;If the data is as simple as that (one record per month) then yes, the script can be simplified to the following (again, dummy data, may make no sense)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Table:LOAD IterNo() AS Month, Ceil(Rand() * 1000) AS Monthly // Amount per monthAUTOGENERATE 1 WHILE IterNo() &amp;lt; 13; TableStep2: // MonthAcum is current month + previousLOAD *, RangeSum(Monthly, Previous(Monthly)) AS MonthAcum // RangeSum will sum NULL (first record) as zero while + will return NULL RESIDENT TableORDER BY Month; DROP TABLE Table; AcumTable: // Amount is the sum of all MonthAcumLOAD *, RangeSum(MonthAcum, Peek('Amount')) AS AmountRESIDENT TableStep2; DROP TABLE TableStep2;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;It needs to be done in three steps because of the Rand(), in your table all steps can be done in the same table.&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2011 09:31:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulation-in-Script/m-p/319975#M1197526</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-04-12T09:31:13Z</dc:date>
    </item>
  </channel>
</rss>

