I am trying to calculate rolling average based on a dynamic range. To give you an example, my data-set looks like the one below. I am trying to calculate the rolling average of the parameter "No. of Users" based on the range "Box no." (12, 13, 14...). Usually, one can calculate rolling average by calculate average for first N rows and then drag it down. However, the issue here is no. of users for the Box no. column vary and therefore I can't use the traditional rolling average method.
Data-set (consider all the values in different row under the column Box No. and Users)
Box No. = 12, 12, 12, 13, 13, 14, 14, 14, 14, 14
Users = 5, 5, 8, 6, 8, 10, 8, 3, 5, 1
So, I am looking for a result like this.
Result (consider all the values in different row under the column Box No. and Rolling Average for No. Users)
Box No. = 12, 13, 14
Rolling Average for (No. of Users) = 6, 7, 5.4
Any help would be appreciated.