Skip to main content

Why does my user report have a GROUP BY expression error?

The error "Each GROUP BY expression must contain at least one column that is not an outer reference." is generated when running a user report where the aggregate function has not defined correctly wit

Updated over 2 weeks ago

The error "Each GROUP BY expression must contain at least one column that is not an outer reference." is generated when running a user report where the aggregate function has not defined correctly within the report.

mceclip0.png

The error occurs when using an aggregate function on at least one of the fields in the User Report and there is at least one "static" field (a field where the value is the same for every row) in the report that is not being aggregated.

Example of a report with 3 fields: Assignment: ID field where a COUNT aggregate function is used and two static fields.

mceclip7.png

To remove the error, use an aggregate function (such as MAX) on static fields. Aggregation on static fields will not have an impact on what value is displayed in those fields.

mceclip8.png

Things to Note

  • The Aggregate function is available for data field and provides different options to adjust the outputs of the report. It should not be applied to every field in the report which includes Custom Fields.

Did this answer your question?