woggles
woggles

Reputation: 7444

SSRS Matrix Not Sorting

I need to display an SSRS report that displays values per month with a custom display order but I cant get it to work. In my tablix properties I have the following sort order as an expression (sorted a-z):

 =Switch(
 Fields!Month.Value = "January", 10,
 Fields!Month.Value = "February", 11,
 Fields!Month.Value = "March", 12,
 Fields!Month.Value = "April", 1,
 Fields!Month.Value = "May", 2,
 Fields!Month.Value = "June", 3,
 Fields!Month.Value = "July", 4,
 Fields!Month.Value = "August", 5,
 Fields!Month.Value = "September", 6,
 Fields!Month.Value = "October", 7,
 Fields!Month.Value = "November", 8,
 Fields!Month.Value = "December", 9)

If I also put the expression as an extra column for testing it returns the expected results, but doesn't sort appropriately. Is there something obvious that I'm missing? It needs to display April first, and then the following months in order.

enter image description here

Edit

I tried changing the switch statement to return a letter instead of an int, but still no luck.

Upvotes: 0

Views: 915

Answers (1)

Mike Honey
Mike Honey

Reputation: 15017

What is providing the month rows e.g. January? Presumably it is a Row Group. The properties of that Group are where you need to set the Sort Order.

Upvotes: 1

Related Questions