Short version is this:
=(RunningSum([Sales Qty]) - RunningSum(Previous([Sales Qty]; 16))) / 16
Add that as a column in a block with your dates and it'll give you a moving average of 16 days.
So what it does is calculate the running total for your sales quantity. But because you only want the last 16 days, if will subtract all numbers before 16 days ago (which is the running sum of the previous statement with an offset of 16). So that gives you a running sum for the last 16 days, and then divides it by 16, giving you the average.
DG.
Add comment