<?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 Aging/Sliding-window Aggregation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aging-Sliding-window-Aggregation/m-p/216799#M70074</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your formula works go with it. I don't see anything technically wrong with it.&lt;/P&gt;&lt;P&gt;However, I think you'll get the same result if you use the following formula that might be easier to look at:&lt;/P&gt;&lt;P&gt;rangesum(below(column(1),0,2))&lt;/P&gt;&lt;P&gt;The current row should be included with the value 0 in the second paramente of the functions above() or below(). I think the error was that my days were backwards. I was thinking Day 1 was the most recent day instead of Day 5. And for some odd reason the numbers matched.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Sep 2010 18:33:27 GMT</pubDate>
    <dc:creator>pover</dc:creator>
    <dc:date>2010-09-27T18:33:27Z</dc:date>
    <item>
      <title>Aging/Sliding-window Aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Aging-Sliding-window-Aggregation/m-p/216792#M70067</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;&lt;/P&gt;&lt;P&gt;I can't seem to find any discussion on this, hence this new post.&lt;/P&gt;&lt;P&gt;I have raw data like this:&lt;/P&gt;&lt;P&gt;Day 5 = 30&lt;/P&gt;&lt;P&gt;Day 4 = 40&lt;/P&gt;&lt;P&gt;Day 3 = 25&lt;/P&gt;&lt;P&gt;Day 2 = 20&lt;/P&gt;&lt;P&gt;Day 1 = 45&lt;/P&gt;&lt;P&gt;I need a a report that shows the sum of the Past-N-Days window; e.g. N=2 and 3:&lt;/P&gt;&lt;P&gt;&amp;lt;Day&amp;gt;|&amp;lt;Past 2 days&amp;gt;|&amp;lt;Past 3 days&amp;gt;&lt;/P&gt;&lt;P&gt;Day 5 | 70 | 95&lt;/P&gt;&lt;P&gt;Day 4 | 65 | 85&lt;/P&gt;&lt;P&gt;Day 3 | 45 | 90&lt;/P&gt;&lt;P&gt;Btw, I have been attempting to solve the problem using SET analysis. The obstacle seems to be that it is impossible to aggregate data beyond the current dimension value. For example, I can't really get the data on Day 4 when my expression is dimensioned by Day 5. Or perhaps my approach in wrong.&lt;/P&gt;&lt;P&gt;I hope someone can help? Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Sep 2010 22:18:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aging-Sliding-window-Aggregation/m-p/216792#M70067</guid>
      <dc:creator />
      <dc:date>2010-09-23T22:18:21Z</dc:date>
    </item>
    <item>
      <title>Aging/Sliding-window Aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Aging-Sliding-window-Aggregation/m-p/216793#M70068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might be better off trying rangesum and above. See the attached example.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Sep 2010 23:56:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aging-Sliding-window-Aggregation/m-p/216793#M70068</guid>
      <dc:creator>pover</dc:creator>
      <dc:date>2010-09-23T23:56:27Z</dc:date>
    </item>
    <item>
      <title>Aging/Sliding-window Aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Aging-Sliding-window-Aggregation/m-p/216794#M70069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's one approach. Two fields, AsOfDay and DaysBack, are explicitly tied to every single day that should be included in that cell. Then you just need a pivot table with those dimensions, and sum(Value) as the expression. Simple!&lt;/P&gt;&lt;P&gt;Except... it won't scale up very well. Basically, you're getting in the neighborhood of the CUBE of the number of days in rows. I already have 2870 rows just for 20 days. If I bump that to 200 days, I get 2,686,700 rows. So it very quickly becomes completely impractical.&lt;/P&gt;&lt;P&gt;More practical solution in next post...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Sep 2010 00:58:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aging-Sliding-window-Aggregation/m-p/216794#M70069</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-09-24T00:58:03Z</dc:date>
    </item>
    <item>
      <title>Aging/Sliding-window Aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Aging-Sliding-window-Aggregation/m-p/216795#M70070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This looks the same on the surface, except that now our AsOfDay and DaysBack fields are islands. They aren't connected to the main data. Instead, we use an IF statement in the chart to connect them. This CAN become impractical, in that if you have 10,000 days you're looking at, and decide to look at all of them at once, and to up to 10,000 days back, I'm sure that's far more data than the chart could ever process. But even if that much data is available, it's ridiculous to look at that much at once. So in practice, for the number of days and days back that people will likely want to look at, I suspect it would work fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Sep 2010 01:01:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aging-Sliding-window-Aggregation/m-p/216795#M70070</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-09-24T01:01:14Z</dc:date>
    </item>
    <item>
      <title>Aging/Sliding-window Aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Aging-Sliding-window-Aggregation/m-p/216796#M70071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thinking further, if you're willing to explicitly limit the number of days back, you can get around the limitation of having too many rows in my first solution. And you can get around even squaring the number of days by using a nice while loop. That might make this a pretty good solution in practice, since it has the advantage of chart simplicity while still scaling up just fine to any number of days.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Sep 2010 01:26:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aging-Sliding-window-Aggregation/m-p/216796#M70071</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-09-24T01:26:52Z</dc:date>
    </item>
    <item>
      <title>Aging/Sliding-window Aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Aging-Sliding-window-Aggregation/m-p/216797#M70072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks John and Karl, I will try them out today.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Sep 2010 15:24:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aging-Sliding-window-Aggregation/m-p/216797#M70072</guid>
      <dc:creator />
      <dc:date>2010-09-27T15:24:51Z</dc:date>
    </item>
    <item>
      <title>Aging/Sliding-window Aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Aging-Sliding-window-Aggregation/m-p/216798#M70073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Karl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the hint. It turns out range sum does not include the current row's "today value" (I believe it is beacause we need to turn above() to "below" using -1), so I have to change it to the following and seems to work correctly now. If you can confirm my change is correct that would be great. Thanks:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Original:&lt;/P&gt;&lt;P&gt;Past 2 Day = rangesum(above(column(1),-1,2))&lt;/P&gt;&lt;P&gt;Past 3 Day = rangesum(above(column(1),-1,3))&lt;/P&gt;&lt;P&gt;New:&lt;/P&gt;&lt;P&gt;// reduce above()'s window by one, and add back the current row value instead.&lt;/P&gt;&lt;P&gt;Past 2 Day = column(1)+rangesum(above(column(1),-1,1))&lt;/P&gt;&lt;P&gt;Past 3 Day = column(1)+rangesum(above(column(1),-1,2))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Sep 2010 17:26:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aging-Sliding-window-Aggregation/m-p/216798#M70073</guid>
      <dc:creator />
      <dc:date>2010-09-27T17:26:49Z</dc:date>
    </item>
    <item>
      <title>Aging/Sliding-window Aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Aging-Sliding-window-Aggregation/m-p/216799#M70074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your formula works go with it. I don't see anything technically wrong with it.&lt;/P&gt;&lt;P&gt;However, I think you'll get the same result if you use the following formula that might be easier to look at:&lt;/P&gt;&lt;P&gt;rangesum(below(column(1),0,2))&lt;/P&gt;&lt;P&gt;The current row should be included with the value 0 in the second paramente of the functions above() or below(). I think the error was that my days were backwards. I was thinking Day 1 was the most recent day instead of Day 5. And for some odd reason the numbers matched.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Sep 2010 18:33:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aging-Sliding-window-Aggregation/m-p/216799#M70074</guid>
      <dc:creator>pover</dc:creator>
      <dc:date>2010-09-27T18:33:27Z</dc:date>
    </item>
    <item>
      <title>Aging/Sliding-window Aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Aging-Sliding-window-Aggregation/m-p/216800#M70075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Karl, thanks. I just notice the "below" function as I scroll down on the reference manual page.&lt;/P&gt;&lt;P&gt;It turns out there is one more requirement that would extend this thread. It is actually very different from the first requirement but I hope somehow I can leverage above() or similar functions.&lt;/P&gt;&lt;P&gt;What we are counting is actually a usage, e.g. people that ride the bus every day. therefore, what we also like to count in addition to the above, is the UNIQUE bus rider over the day range. I have been trying to use the above() inside a SET expression but no luck so far.&lt;/P&gt;&lt;P&gt;Any advice?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Sep 2010 18:46:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aging-Sliding-window-Aggregation/m-p/216800#M70075</guid>
      <dc:creator />
      <dc:date>2010-09-27T18:46:13Z</dc:date>
    </item>
    <item>
      <title>Aging/Sliding-window Aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Aging-Sliding-window-Aggregation/m-p/216801#M70076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bonchef,&lt;/P&gt;&lt;P&gt;I had to think about this for a little bit. There doesn't appear to be a way to use inter-record functions to do a count distinct between various rows. You can only sum the count distinct of each separate day.&lt;/P&gt;&lt;P&gt;Also, with set analysis you can't use the value of the dimension in one line of the table as a reference to sum or count between other lines on the table.&lt;/P&gt;&lt;P&gt;So, the only option I can think of is to use the classic sum(if) with an island table. The only problem with this solution is the time it might take to calculate the table in QlikView.&lt;/P&gt;&lt;P&gt;I've attached an example using sum. You would replace the function with count(distinct rider_id)&lt;/P&gt;&lt;P&gt;Give it a try. I hope it works.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Sep 2010 16:33:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aging-Sliding-window-Aggregation/m-p/216801#M70076</guid>
      <dc:creator>pover</dc:creator>
      <dc:date>2010-09-28T16:33:58Z</dc:date>
    </item>
    <item>
      <title>Aging/Sliding-window Aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Aging-Sliding-window-Aggregation/m-p/216802#M70077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can still handle it with the AsOf table that I posted, with no changes. It manages all the connections with data instead of inter-record functions, so you can use all the normal aggregation stuff, such as count(distinct Rider). It does not have the performance issues on large data sets that the count(if()) approach would have. Basically, it takes the performance hit during the load instead, where it is usually more palatable. See attached.&lt;/P&gt;&lt;P&gt;(Edit: Improved performance of the AsOf table load, in case that's an issue. Now using fieldvalue() function instead of loading from a table. It executes significantly more quickly on large data sets, but is a bit more confusing than simply loading distinct.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Sep 2010 17:46:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aging-Sliding-window-Aggregation/m-p/216802#M70077</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-09-28T17:46:05Z</dc:date>
    </item>
    <item>
      <title>Aging/Sliding-window Aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Aging-Sliding-window-Aggregation/m-p/216803#M70078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks John, will test that out shortly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Sep 2010 14:07:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aging-Sliding-window-Aggregation/m-p/216803#M70078</guid>
      <dc:creator />
      <dc:date>2010-09-29T14:07:28Z</dc:date>
    </item>
    <item>
      <title>Aging/Sliding-window Aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Aging-Sliding-window-Aggregation/m-p/216804#M70079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just want to share this. When one is doing sliding window in an ad-hoc analysis interactively, this is a very useful trick:&lt;/P&gt;&lt;P&gt;http://qlikviewmaven.blogspot.com/2010/07/stepping-selection-through-each-value.html&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Sep 2010 13:35:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aging-Sliding-window-Aggregation/m-p/216804#M70079</guid>
      <dc:creator />
      <dc:date>2010-09-30T13:35:58Z</dc:date>
    </item>
    <item>
      <title>Aging/Sliding-window Aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Aging-Sliding-window-Aggregation/m-p/216805#M70080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Sep 2010 17:59:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aging-Sliding-window-Aggregation/m-p/216805#M70080</guid>
      <dc:creator>pover</dc:creator>
      <dc:date>2010-09-30T17:59:53Z</dc:date>
    </item>
  </channel>
</rss>

