Thank you, Tharashasank, I'll get into that document
I have only given it a superficial reading (no time for more, now), but, if I understand my problem correctly, my main difficulty is around the subtracting and incrementing 1, not exactly around the window_sum() definition. Maybe the post you refer addresses that indirectly?
2 of 2 people found this helpful
I suspect it has something to do with the offset parameter of the window_sum function. The Window_sum function will apply to the value matching the offset + all values up to and including current value. In this case, I suspect they want the window to be inclusive of current value, and hence have to "reduce it by 1" (notice they start negative, and then add one, to reduce the window size to match the parameter being used). A negative offset means the window begins at that many values before the current value.