Hey All, I'm trying to calculate variance on some usage data with multiple calculations.
I need to be able to calculate the average of the 5 prior same days of the week.
For example for the date of 8/16 to find the variance I would need to compare the average of 8/9,8/2,/7/26,7/19,/7/12.
I also need to pull in average and total for the current day as well has show variance over 5% and anything negative.
I've tried a bunch of things but can't see to get anything to calculate properly.
Any help would be appreciated. Thanks!
This thread and associated YouTube video will get you started.
Make sure to contact your CSM and ask them to enable windowed functions in beast modes.
Thanks so much! One thing that is the issue is it needs to be the same day of the week just looking back the last five weeks so if its monday, all the mondays back. I'm currently doing a lag but when I group by and sum usage it is not calculating correct so I feel like I am doing something wrong. Thanks so much for you input, good info for sure!
... set your lag to n * 7?
I've got some downtime until my next call. If you want to do a team's / zoom, ping me in the Slack group.
No problem @kacy . To help the community, can you post a screenshot of what you did in the end in your ETL?