For a daily alert, we can not merely measure the difference between two consecutive days because day of week matters - we have much lower traffic on the weekends, a Monday peak followed by a typical slow decline.
What I would like to do for an alert is something like this:
For the particular day of week, if variance of the count of records is more than +/- 20%, as compared to the AVERAGE COUNT count of records for the same day of week over the last 60 days, then alarm.
I have messed with beast modes, and don't want to do a data flow if i don't have to. Any suggestions? Thanks.
Because you're wanting to do an average of the count (an aggregate of an aggregate) BeastMode won't be able to help you. You'll need to utilize a data flow to track your running total / count and then you could utilize a beast mode to calculate the difference between your current day's value and the average count.
So, a whole new table that tracks a rolling average? Probably one column per day so that i could keep the rolling averages and get trending? Or should i just have one column with 7 rows that get update daily? Thanks.
If you don't care about keeping a historical record you could do it with the MagicETL
- Date Operation to get the Day of Week on your main data set
- Split your main dataset using a filter to pull the last 60 days
- Group On Day of Week - calculating the average
- Join this grouping back to your original dataset (that you fed into the group by) based on the day of the week
- Can either calculate the difference between the day in the ETL or in a BeastMode and utilize that as your summary number to alert on.