In most cases, errors that occur when saving the alerts configuration are related to syntax and can be quickly resolved by reviewing the associated line numbers. This page includes some additional information for errors that aren't as straightforward to diagnose.
Error parsing trigger expression: This PowerQuery cannot be used in an alert:must include 'group' command
This alert error is displayed if the
sort routine is used within the body of an alert, as sort interferes with the way PowerQuery alerts are processed. For example, attempting to save the following query will return the above error:
serverHost='Test123' distinguishedName contains 'Test'
| sort -timestamp
| group Member=first(member), dn=first(distinguishedName), Test=first(testAccountName) by DC
| columns Test, DC, Member
Rather than using
last, use the
oldest functions, which were designed for this particular use case. For more information, please see: https://app.scalyr.com/help/power-queries?#aggFx