8 Replies Latest reply: Dec 14, 2016 6:12 AM by Karthik Chinnas RSS

    Rolling average for 3 months in a pivot table

    Karthik Chinnas

      Hi all,

       

      I've looked into various solutions here for this sort of queries earlier, but perhaps because of the fields I am using, I may not be able to crack it. You will be able to understand when you look at the qvw. file attached.


      I have the data from Apr to Sept this year. What I am trying to get is the rolling average: For April, I would like the expression to take the April value because no values before that. For May, I would like it to take avg( April + May) values. For June, I would like it to take avg(April + May + June). For July, I would like it to take the previous 3 months, i.e., avg(July, June and May), etc., so on and so forth for the following months.


      In background colour, I would like the same as well. If the values don't meet the target, then Red, otherwise Green.


      Any help is appreciated. I will keep trying too.