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:

  • SUM
  • MIN
  • MAX
  • AVG
  • COUNT

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
Fork
  • This demo contains 4 Alerts that fire when an Aggregated Boolean Expression is triggered
    • Info Alert if the lowest Github Watchers values is under 50
    • Success Alert when the total of all the Github Stars rows is over 10,000
    • Warning Alert when the total of all Open Issues - only for rows where Language is JavaScript - is over 6,000
    • Error Alert when the count of all Language is 3 or greater where value is 'HTML'
Try It Out
  • In the first row change the value of:
    • Github Watchers column to 45 and see the Info Alert be fired
    • Github Stars column to 279429 and see the Success Alert be fired
    • Open Issues column to 1220 and see the Warning Alert be fired (because Language in first row is "JavaScript")
    • Language column to HTML and see the Error Alert be fired (because we now have 3 values with HTML)

Aggregation Alerts

(Recorded with AdapTable v16.0)