Order column data in a tablix in SSRS

ssrs

I have created a report with following data

Age_Category  Count
31-40          10
41-50          20
51-60          30
61 and Over    40
Under 30       50

Now I want to order "Age_Category" column in SSRS like below, what is the best approach

Age_Category  Count
Under 30       50
31-40          10
41-50          20
51-60          30
61 and Over    40

Best Answer

create table #MyCategory ( Category varchar(20), SortOrder int )
create table #MyResultData ( Category varchar(20), Count int )

-- in no particular order...
insert into #MyCategory ( Category, SortOrder ) values
     ('51-60',       4 )
    ,('61 and Over', 5 )
    ,('31-40',       2 )
    ,('Under 30',    1 )
    ,('41-50',       3 )

-- in no particular order...
insert into #MyResultData ( Category, Count ) values
     ('61 and Over', 50 )
    ,('41-50',       30 )
    ,('31-40',       20 )
    ,('51-60',       40 )
    ,('Under 30',    10 )

-- sorted
select t1.Category, t1.Count
from #MyResultData as t1 join #MyCategory as t2 on t1.Category = t2.Category
order by t2.SortOrder