Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use an Aggregate function in Sort Expression

I have a report which uses a dataset returned from a stored procedure. There are two key columns: Name and Value

I am using this dataset for two tablixes. The first is just a straightforward tablix displaying the data.

The second groups the data based on a Name column. I need to order this data based on the Sum of Value column

However I get the following error:

[rsAggregateInDataRowSortExpression] A sort expression for the tablix 'table1' includes an aggregate function. Aggregate functions cannot be used in data row sort expressions.

Is there another way I can show the data grouped by name and still order it by Sum(Value)?

like image 989
openshac Avatar asked Jun 17 '11 11:06

openshac


1 Answers

Instead of sorting on the tablix you need to sort against the row group. Remove the sort on the tablix and then go to the row group properties and put the same sort expression under the sorting section there, this should then work.

like image 78
cg1 Avatar answered Dec 07 '22 08:12

cg1