A couple of weeks ago I wanted to set up a server alert when a daily count was either over or under a specific range. This was the first time I had tested out server alerts and was disappointed to find out that the alert threshold was a hard coded value. Since then, I have tested out a few ideas and I think for what I am looking to do the steps below are the best solution I have come up with.
I generated an Excel sheet with random values by day using the RANDBETWEEN() function. I altered a couple of records to make sure I have values that would exceed or be below my range. I brought the sheet into Tableau and then created a few calculated fields for my range.
- Window Average – WINDOW_AVG(SUM([Widgets]))
- Upper- WINDOW_STDEVP(SUM([Widgets])) + [Window Average]
- Lower – [Window Average] – WINDOW_STDEVP(SUM([Widgets]))
I then created a simple line chart with indicators for when the daily value was +/- the upper and lower values. I also added the above calculations as references lines.
It is easy for me to now see where I have issues with my widget numbers. But, I want a alert to go out to a group of people when the widgets are above or below that range. After testing out a few different options the solution I ended up with was to create an additional chart that just had the widget counts for those days that were outside of the range.
To get the above chart I created a boolean calculated field that looked to see if the widget count was above the high value or below the low value and applied that as a filter. Over or Under – SUM([Widgets]) > [Upper] OR SUM([Widgets]) < [Lower].
I then created a bar chart with the indicators for just the days that are outside my range and added that to a dashboard. I can then create an alert off the second chart where the value is greater than or equal to zero.
It isn’t exactly what I want but I think this is the best solution that I tried. I’d love to hear from anyone else who has tackled this to see what solutions you’ve come up with.
Thanks for reading!