I was trying to reproduce the trick you showed me to emulate a 3 year moving average (I'll attach the successful model in the next message) and it failed at the first step, since the trick which worked with stock market data--create a vector of 1s and then sum that so that it goes 1 2 3 3 3 3 ... failed: I just get 1 2 3 4 5 6 7 ...
A diagnosis of why this worked for one file (in the next entry) and didn't in this one would be useful. But the best move would be to create a moving sum operator, which can then be divided by a scalar to produce a moving average.
Moving sums/averages are faily common operations, especially for people in finance (as in the next file) so it would be good to just have an operator, rather than a workaround which, for some reason, didn't work in this attempt.
The successful workaround file.
You need to specify a window size of 3 to get 1 2 3 3 3 3
I did that. See image and RVL file.
The axis is called Year, not Date.
Strange! I added a new running sum, and it worked with that. But it's still not working with the older one.
Here's another comparison. The original operator doesn't work, with the same settings on which the new one does.
Replace the old running sum operator with the new one and everything is fine.
Finally got the intended result. I hope I've uncovered something buggy in the code in the process.
The exercise has emphasised the desirability of a running sum and a running average operator. In terms if icons, maybe indicate them with arrows <--> above the current cumulative sum and average operators?
It looks to me like you copied a running sum operator that was summing along "Date" into a new situation that needs to sum along "Year". It looks to me like everything is running as it should.
Even if there was a moving average operator, you'll still need to get axis and window arguments right.
I'm going to add a feature request for the operators to name their arguments. In this case "Argument" could be called "Window", and appear as such in the dialog. Delta operators could call their argument "delta".