<?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: calculating sum for previous months including current one in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/calculating-sum-for-previous-months-including-current-one/m-p/1121437#M369584</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;not able to see the screen shot. can you attach the screen shot again?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Jul 2016 05:40:11 GMT</pubDate>
    <dc:creator>settu_periasamy</dc:creator>
    <dc:date>2016-07-22T05:40:11Z</dc:date>
    <item>
      <title>calculating sum for previous months including current one</title>
      <link>https://community.qlik.com/t5/QlikView/calculating-sum-for-previous-months-including-current-one/m-p/1121436#M369583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm in trouble to get proper result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table like below:&lt;/P&gt;&lt;P&gt;Sample:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; YearMonth, Sales&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2009-01', 55&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2009-02', 39&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2009-03', 33&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2009-04', 56&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2009-05', 55&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2009-06', 70&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2009-07', 57&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2009-08', 29&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2009-09', 34&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2009-10', 41&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2009-11', 12&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2009-12', 11&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2010-01', 24&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2010-02', 85&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2010-03', 99&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2010-04', 77&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2010-05', 85&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2010-06', 64&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2010-07', 61&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2010-08', 45&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2010-09', 62&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2010-10', 70&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2010-01', 59&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2010-12', 25&lt;/P&gt;&lt;P&gt; ];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I want to calculate for each month sum of all previous months and current one. Result should be like this:&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image CToWUd a6T" height="533" src="https://mail.google.com/mail/u/0/?ui=2&amp;amp;ik=ac9a543050&amp;amp;view=fimg&amp;amp;th=1560f4b2db22d7d4&amp;amp;attid=0.1&amp;amp;disp=emb&amp;amp;realattid=b7aaf73d70f85321_0.1&amp;amp;attbid=ANGjdJ_4U41vJoVNHOBMKtXDIueCNOhMBzHhdv907U5f_yg6PWooE6qNi6suGihw65hFuOv6Ljvu9neK7yR25LluVjkYwJoZcC_QTJmpDhLd5c2DSGCvR1Yo2Lk1WeU&amp;amp;sz=w700-h1066&amp;amp;ats=1469136632651&amp;amp;rm=1560f4b2db22d7d4&amp;amp;zw&amp;amp;atsh=1" width="350" /&gt;&lt;/P&gt;&lt;P&gt;I will very appreciated for any help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regads, Jacek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2016 21:39:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculating-sum-for-previous-months-including-current-one/m-p/1121436#M369583</guid>
      <dc:creator>jacek_sobczak</dc:creator>
      <dc:date>2016-07-21T21:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: calculating sum for previous months including current one</title>
      <link>https://community.qlik.com/t5/QlikView/calculating-sum-for-previous-months-including-current-one/m-p/1121437#M369584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;not able to see the screen shot. can you attach the screen shot again?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jul 2016 05:40:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculating-sum-for-previous-months-including-current-one/m-p/1121437#M369584</guid>
      <dc:creator>settu_periasamy</dc:creator>
      <dc:date>2016-07-22T05:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: calculating sum for previous months including current one</title>
      <link>https://community.qlik.com/t5/QlikView/calculating-sum-for-previous-months-including-current-one/m-p/1121438#M369585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jacek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use this expression to calculate some of each month and previous month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vMonth = &lt;SPAN style="font-size: 13.3333px;"&gt;Date(&lt;/SPAN&gt;Monthend(Today()),'&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;YYYY-MM')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Let vPreviousmonth = Date(Monthstart(Addmonths(Today(),-1)),'YYYY-MM')&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Sum({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;YearMonth = {"&amp;lt;=$(vMonth) &amp;gt;=$&lt;SPAN&gt;(&lt;SPAN style="font-size: 13.3333px;"&gt;vPreviousmonth)"}&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;gt;} Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;This should work..&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Many Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Karthik&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jul 2016 05:44:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculating-sum-for-previous-months-including-current-one/m-p/1121438#M369585</guid>
      <dc:creator>karthikoffi27se</dc:creator>
      <dc:date>2016-07-22T05:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: calculating sum for previous months including current one</title>
      <link>https://community.qlik.com/t5/QlikView/calculating-sum-for-previous-months-including-current-one/m-p/1121439#M369586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Sample:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Load&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; *,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; If (Year=Previous(Year), RangeSum(Sales,Peek(AccSum)), Sales) as &lt;STRONG&gt;Yearly&lt;/STRONG&gt;AccSum;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD *,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; Year(Date#(YearMonth,'YYYY-MM')) as Year,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; month(Date#(YearMonth,'YYYY-MM')) as Month INLINE [&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; YearMonth, Sales&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2009-01', 55&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2009-02', 39&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2009-03', 33&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2009-04', 56&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2009-05', 55&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2009-06', 70&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2009-07', 57&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2009-08', 29&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2009-09', 34&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2009-10', 41&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2009-11', 12&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2009-12', 11&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2010-01', 24&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2010-02', 85&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2010-03', 99&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2010-04', 77&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2010-05', 85&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2010-06', 64&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2010-07', 61&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2010-08', 45&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2010-09', 62&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2010-10', 70&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2010-01', 59&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2010-12', 25&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Note: Assumption - input data is &lt;/SPAN&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&lt;STRONG&gt;sorted.&lt;/STRONG&gt; Data is accumulated yearly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jul 2016 05:52:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculating-sum-for-previous-months-including-current-one/m-p/1121439#M369586</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2016-07-22T05:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: calculating sum for previous months including current one</title>
      <link>https://community.qlik.com/t5/QlikView/calculating-sum-for-previous-months-including-current-one/m-p/1121440#M369587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you need total accumulation i.e. across years, you have to just remove the year match condition, like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;Sample:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;Load&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp; *,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp; RangeSum(Sales,Peek(AccSum)) as AccSum;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jul 2016 05:58:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculating-sum-for-previous-months-including-current-one/m-p/1121440#M369587</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2016-07-22T05:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: calculating sum for previous months including current one</title>
      <link>https://community.qlik.com/t5/QlikView/calculating-sum-for-previous-months-including-current-one/m-p/1121441#M369588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Couldnt view the second screenshot. If this is what you meant, you may simply try accumulation under expression tab. &lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/132152_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jul 2016 06:02:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculating-sum-for-previous-months-including-current-one/m-p/1121441#M369588</guid>
      <dc:creator />
      <dc:date>2016-07-22T06:02:33Z</dc:date>
    </item>
  </channel>
</rss>

