4 Replies Latest reply: Jun 11, 2012 5:59 AM by Stefan Wühl RSS

    rangeAvg excluding the first few datapoints

      I am trying to calculate a 6 month moving average. I have read fairly extensively and tried several options, and what I have so far is this:

       

             RangeAvg(above(sum({1} [AllShareValue]),0,6))

       

      The reason why I use the  {1} set analysis is because when people select a section of months, the first selection needs to go 6 months back out of that selection period in order to calculate itself, so I have to use the {1} so that the calculation knows there are more months behind the first selected one.

       

      This is all well and good, but the problem is that the graph is showing data outside of the selection now.

       

      I want to calculate using data outside of the selection, but then display data within the currently selected dates

       

      I'm fairly new to qlikview, and I'm struggling to rap my head around this one. Any ideas?

       

       

       

       

       

       

       

      Please don't reply with qlikview documents containing the calculation, because I currently don't have the full version of Qlikview. I'm creating a prototype to illustrate to my boss what qlikview can do, in order to convince him to buy it.