Search code examples
sortingreporting-servicesssrs-2008ssrs-expression

Trying to SORT table on Expression


I have two tables in my report. Grouped on fields DatePaidFinancialYear and then SupplierName.

I have removed both sorts on the groups themselves. There is also no sort on the tablix.

I then have a COUNT IF in one table that does the following - =Count(IIF(Fields!DaysLateCategory.Value = "Over10Days" , 1, Nothing)) and the below in the other =Count(IIF(Fields!DaysLateCategory.Value = "Over30Days" , 1, Nothing))

This gives me below -

enter image description here

I want to sort so that the highest number is at the top. I can't work out how to do it.

When I try and sort by my counts via the Tablix - I get the following error -

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

Please advise


Solution

  • IRC - you should remove the table sort and sort using the same expression on the Group properties

    Excellent. I could have sworn I tried this but obviously not. All working now.

    Thanks