<?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: Accumulative values per month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Accumulative-values-per-month/m-p/1435882#M431358</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// test data&lt;/P&gt;&lt;P&gt;&lt;EM&gt;S:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;addmonths(makedate(2015), iterno()+2) as date,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;10 as income&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;AutoGenerate 1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;while iterno() &amp;lt;= 28;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// make the final table with accumulative field&lt;/P&gt;&lt;P&gt;&lt;EM&gt;F:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;date,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;income,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(year(date)&amp;lt;&amp;gt;year(peek('date')), income, income + peek('accumulative')) as accumulative&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident S;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; Table S;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;IMG alt="1.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/176962_1.png" style="height: auto; width: auto;" /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;peek and previous&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3048"&gt;Peek() vs Previous() – When to Use Each&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Sep 2017 19:24:27 GMT</pubDate>
    <dc:creator>maxgro</dc:creator>
    <dc:date>2017-09-18T19:24:27Z</dc:date>
    <item>
      <title>Accumulative values per month</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulative-values-per-month/m-p/1435881#M431357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am doing a ratio that involves accumulative values per month, I was thinking about assigning a numeric value to each month and then with an if statement create a conditional that, depending on the number of the moth would add the previews months or start over (that would be the case in January), but I read something about a &lt;SPAN class="Bold" style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;previous(&lt;/SPAN&gt;&lt;SPAN class="Italic" style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;expression&lt;/SPAN&gt;&lt;SPAN class="Bold" style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;) &lt;/SPAN&gt;statement and I think that might help me get the same result but with only one expression, unfortunatley I havent ben able to find a post describing the complete use of the expresion, could you please help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The table I am looking to build will looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp; Month, Income, Accumulative&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Jan, 10, 10&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Feb, 10, 20&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mar, 10, 30&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Apr, 10, 40&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; May, 10, 50&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Jun, 10, 60&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Jul, 10, 70&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Aug, 10, 80&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sep, 10, 90&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Oct, 10, 100&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Nov, 10, 110&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dec, 10, 120&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Thank you in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2017 18:26:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulative-values-per-month/m-p/1435881#M431357</guid>
      <dc:creator />
      <dc:date>2017-09-18T18:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulative values per month</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulative-values-per-month/m-p/1435882#M431358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// test data&lt;/P&gt;&lt;P&gt;&lt;EM&gt;S:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;addmonths(makedate(2015), iterno()+2) as date,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;10 as income&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;AutoGenerate 1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;while iterno() &amp;lt;= 28;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// make the final table with accumulative field&lt;/P&gt;&lt;P&gt;&lt;EM&gt;F:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;date,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;income,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(year(date)&amp;lt;&amp;gt;year(peek('date')), income, income + peek('accumulative')) as accumulative&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident S;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; Table S;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;IMG alt="1.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/176962_1.png" style="height: auto; width: auto;" /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;peek and previous&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3048"&gt;Peek() vs Previous() – When to Use Each&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2017 19:24:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulative-values-per-month/m-p/1435882#M431358</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2017-09-18T19:24:27Z</dc:date>
    </item>
  </channel>
</rss>

