Hey Alteryx Community,
I am trying to get the value for the average headcount for the previous year to use in an annual attrition calculation - I have been able to acheive this in snowflake with the following window function:
'avg(headcount) OVER (PARTITION BY field_1, field_2, field_3 ORDER BY run_date ROWS BETWEEN 346 PRECEDING AND CURRENT ROW) as twelve_month_headcount'
I want to be able to report the annual attrition on a daily basis, I am trying to replicate this in Alteryx using a multi-row formula, but I cannot find a way to do this without having to use row-1, row-2, row-3, row-4.... row-n.
Is there a way to do a rolling average for a large number of rows without having to add each row as it's own variable?
Thanks