3 Replies Latest reply: Mar 3, 2015 4:14 AM by Claus Elbo RSS

    moving average in qlikview

      i´m looking for an example of moving average in qlikview

        • moving average in qlikview
          John Witherspoon

          Here's an example of two ways to handle a rolling 50-day average. The difference is in what you do for the first 50 days. For the blue line, it just takes the average of the days so far. For the red line, it assumes that the value was 0 for the previous 50 days, so takes a straight 50 day average assuming 0 for those days. The to lines converge after 50 days, of course.

          In a real application, I have a rolling year average by week, and instead of taking the previous 52 weeks, I actually take the previous 26 weeks and next 26 weeks. So the period being averaged is centered on the displayed date, rather than the displayed date being the end of the period. For the start and end of the date range, I average the weeks that are available, so I'm using as few as 26 weeks in the average.