The following general syntax structure can be used for aggregations, with many optional parameters:
aggrexpression ::= ( fieldref | operator1 aggrexpression | aggrexpression operator2 aggrexpression | functioninaggr | ( aggrexpression ) )
fieldref is a field name.
functionaggr ::= functionname ( parameters2 )
Expressions and functions can thus be nested freely, as long as fieldref is always enclosed by exactly one aggregation function and provided the expression returns an interpretable value, QlikView does not give any error messages.