Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
I would do a second window function after the first one. So, take the "Windows result", then apply a "Windows Recipe" where the partitioning column is "City" and the ordering columns are "Year" and "Month".
Then in the "aggregations" step, select "Lag" for the column "Sales_lag_diff", and then rename it to "Variations" so you get the result with the name you have in your model screenshot.
I wasn't able to make it in one step, unless I use a python recipe to do the trick.