Sorting by a Different Value
You might want to sort the rows in a data region by a value other than the field value. For example, suppose that the field Size contains text values that correspond to small, medium, large, and extra large. By default, the sort expression for a row group based on Size is also [Size]. To have more control over the way that data is sorted, you can add a field to the dataset query that defines the sort order that you want.
Alternatively, you can define a dataset that includes only the sizes and a value that specifies the order that you want. You can change the sort expression to use the Lookup function for the sort order value.
For example, assume that the following Transact-SQL query defines a dataset named Sizes. The query uses a CASE statement to define a sort order value SizeSortOrder for each value of Size: