I have a problem that i really don't know how to solve. Basically what i need to achieve is to build a table that contains a moving average for a list of items based on a rolling date. I need to build it in the script cause i need it later to make other calculations. The difficult part is that the interval should be different for every single item. i created an example in excel, where i calculated a 3 days moving average for item A and a 5 days moving average for item B.