Josh Sama
Josh Sama

Reputation: 33

Sorting expressions on SSRS

I've created a table on Visual studio (SSRS) that has 1 parent group and 2 child groups with drilldown, one of the child groups is a union of 2 columns from the sql script , Below is the expression used on that one:

    =IIF(Count(Fields!Terminal_ID.Value)>1 ,
Fields!Tier_1_Customer.Value & " (" &  Count(Fields!Terminal_ID.Value) & " POS terminals)",
Fields!Tier_1_Customer.Value & " (" &  Count(Fields!Terminal_ID.Value) & " POS terminal)")

The result of that will be something like:

 Store # 4 ( 1 device)
 Store # 3 ( 2 devices)
 Store # 8 ( 9 devices)

What I cannot figure out how to do is how to apply a sort so it can display the data from z to a as below:

Store # 8 ( 9 devices)
Store # 3 ( 2 devices)
Store # 4 ( 1 device)

I've applied different sorting options to the column but it does not work , any suggestion?

Upvotes: 0

Views: 93

Answers (1)

StevenWhite
StevenWhite

Reputation: 6034

Go in to the child group properties. In the sort tab, use this expression:

=Count(Fields!Terminal_ID.Value)

Set it to descending (Z-A). This will sort the details of this group by this value.

Upvotes: 1

Related Questions