<?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 sum over dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/sum-over-dates/m-p/391579#M146071</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey, I'm struggling to get the right output for a line chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's say we have an Athlete X, who scored points in some races. Now I want a line chart with his cumulative points over the period of one year for each date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a table it works fine &lt;SPAN style="text-decoration: underline;"&gt;as long as I have a Date selected&lt;/SPAN&gt;, the expression for this is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Date={"&amp;gt;$(=Num(AddYears(Date,-1)))&amp;lt;=$(=Num(Date))"}&amp;gt;}Points)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when I select a date it sums the points from one year before the selected date until that date. But when I try to plot this in a line chart it doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And when I do select a date the line chart just gives me the dates from one year before that date until the selected date with the points for those specific Dates, so it does not accumulate anything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to make this work? After all, qlikview is able to do the calculations (in a straight table), so I would think it should be possible to put them in a line chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thnx in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Oct 2012 14:29:49 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-10-08T14:29:49Z</dc:date>
    <item>
      <title>sum over dates</title>
      <link>https://community.qlik.com/t5/QlikView/sum-over-dates/m-p/391579#M146071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey, I'm struggling to get the right output for a line chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's say we have an Athlete X, who scored points in some races. Now I want a line chart with his cumulative points over the period of one year for each date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a table it works fine &lt;SPAN style="text-decoration: underline;"&gt;as long as I have a Date selected&lt;/SPAN&gt;, the expression for this is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Date={"&amp;gt;$(=Num(AddYears(Date,-1)))&amp;lt;=$(=Num(Date))"}&amp;gt;}Points)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when I select a date it sums the points from one year before the selected date until that date. But when I try to plot this in a line chart it doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And when I do select a date the line chart just gives me the dates from one year before that date until the selected date with the points for those specific Dates, so it does not accumulate anything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to make this work? After all, qlikview is able to do the calculations (in a straight table), so I would think it should be possible to put them in a line chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thnx in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 14:29:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-over-dates/m-p/391579#M146071</guid>
      <dc:creator />
      <dc:date>2012-10-08T14:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: sum over dates</title>
      <link>https://community.qlik.com/t5/QlikView/sum-over-dates/m-p/391580#M146072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe you need rangesum instead. Something like rangesum(above(Points,0,rowno())&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 14:40:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-over-dates/m-p/391580#M146072</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2012-10-08T14:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: sum over dates</title>
      <link>https://community.qlik.com/t5/QlikView/sum-over-dates/m-p/391581#M146073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;rangesum(above(Points,0,rowno())) gives a total accumulation of all points, so it is a step in the right direction but we're not quite there, is there any way to make it accumulate only for a period of time of one year?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 14:45:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-over-dates/m-p/391581#M146073</guid>
      <dc:creator />
      <dc:date>2012-10-08T14:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: sum over dates</title>
      <link>https://community.qlik.com/t5/QlikView/sum-over-dates/m-p/391582#M146074</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;In short the set statement {&amp;lt;Date={"&amp;gt;$(=Num(AddYears(Date,-1)))&amp;lt;=$(=Num(Date))"} is calculated &lt;SPAN style="text-decoration: underline;"&gt;once &lt;/SPAN&gt;for the entire chart. You could see it in a header of straight table if you don't choose the lable for it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There're two approaches (to do it dynamicaly):&lt;/P&gt;&lt;P&gt;1) use interrecord aggregations as mentioned above (read the help about parameters of above() function)&lt;/P&gt;&lt;P&gt;2) create 'accumulation calendar'&amp;nbsp; (for example &lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/message/88613#88613" title="http://community.qlik.com/message/88613#88613"&gt;http://community.qlik.com/message/88613#88613&lt;/A&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 17:47:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-over-dates/m-p/391582#M146074</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2012-10-08T17:47:04Z</dc:date>
    </item>
  </channel>
</rss>

