How to specify an order for the columns in a matrix?

Gerrie Schenck picture Gerrie Schenck · Jan 26, 2009 · Viewed 40.9k times · Source

I'm working on a SQL Reporting Services report (in VS.Net 2005) which displays a count of different data in a matrix. The columns have a count on the amount of customers in a certain set. So I have several columns like these: "1 employer", "2-9 employers", "10-19 employers" and so on.

The problem I have is that SQL Reporting Services sorts the columns in the matrix alphabetically. So I end up having the "10-19" column after the "1 employer" column but before the "2-9".

Is there any way to fix this? Or maybe a trick to change the labels of the columns to that they sort right?

Thanks.

Answer

BilliD picture BilliD · Apr 16, 2014

This can also be done by adding a new column to the query for the sort order. Then right click the column group from the matrix and select group properties. On the left hand side select sorting. From here you can specify another column to sort by instead of the column header. No custom formula needed.