You can create an alert to send an email or Slack notification whenever the results from a query-based or Look-linked dashboard tile meet or exceed a specified threshold. Looker creates alerts based on comparisons of whole number and decimal data values. However, with a simple workaround, you can set alerts based on percentage changes of data values.
To set an alert condition based on a change in data values, your query must contain a date field.
Say that you want to be compare the percent change in average temperature in San Francisco from one period to the previous period and be alerted when the temperature has increased by more than two percent.
If the current period's average temperature is 100 (yikes!), then that alert would be triggered if the temperature becomes greater than 102, a change of more than two percent. If the 102+ then increases by more than two percent again, then another alert will be triggered.
To compare percent values, use table calcs!
- Create a table calculation that does the percent change. This example pivots on a dimension City and introduces a table calc % Change on the measure Avg Temp.
- Create an alert off of that table calc field by selecting
field_nameand increases by from the Alert if drop-downs, and then entering "0.02" for the value in the alert creation pop-up.