The specified expression contains a subquery or other expression that functions as a subquery.
Possible cause:
TRANSFORM Sum([OrderAmount]) AS Sum1
SELECT Sum([Sum1]) AS Sum2, OrderID, Sum([Sum2]) AS Expr1
FROM Orders
GROUP BY OrderID
PIVOT ShipName;
The <expression> parameter of the alert would contain the expression Sum([Sum2])
from the SELECT clause, because this references an alias used in the same SELECT statement and acts as a subquery against Sum([Sum1])
.