Aggregation Alerts
Summary
- Aggregation Alerts can use Aggregation Boolean Expressions
- These will evaluate using multiple rows and fire if the return value is true
Alerts in AdapTable can fire as the result of an Aggregation Expressions.
This is a special type of Expression which runs against aggregated data and returns a true / false value.
For instance to define an Alert which fires when the total of a 'PnL' column is > 50M:
// Is the sum of all PnL values over 5M
SUM([PnL]) > '50M'
Aggregation Functions
Currently 5 Aggregation Functions are supported:
SUMMINMAXAVGCOUNT
Caution
Aggregation Expressions require the Alert to have a Scope of All (i.e. the whole row)
Find Out More
The AdapTableQL Guide provides full details on writing Aggregation Expressions
WHERE Clause
Aggregation Alerts often have a WHERE clause which limits which rows are included in the evaluation.
For instance to define the Alert above, but only in rows with a Dollar Currency we would write:
// Are all PnL values in rows with Dollar Currency over 5M
SUM([PnL]) > '50M' WHERE [Currency] = 'USD'Alerts: Aggregated Expressions
- This demo contains 4 Alerts that fire when an Aggregated Boolean Expression is triggered
InfoAlert if the lowestGithub Watchersvalues is under 50SuccessAlert when the total of all theGithub Starsrows is over 10,000WarningAlert when the total of allOpen Issues- only for rows where Language is JavaScript - is over 6,000ErrorAlert when the count of allLanguageis 3 or greater where value is 'HTML'
Try It Out
- In the first row change the value of:
Github Watcherscolumn to 45 and see theInfoAlert be firedGithub Starscolumn to 279429 and see theSuccessAlert be firedOpen Issuescolumn to 1220 and see theWarningAlert be fired (becauseLanguagein first row is "JavaScript")Languagecolumn to HTML and see theErrorAlert be fired (because we now have 3 values with HTML)
Aggregation Alerts
(Recorded with AdapTable v16.0)