• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 566
  • Last Modified:

SQL Report Builder - Matrix Report


I'm new to SQL Server Reporting Services. I have created a Report model and using the Report Builder, I'm trying to create a Matrix report from a Report Model. The matrix report I have created looks like below.

Age             Grade1        Grade2          Grade3          Total
29                  1                                                               1
30                                        1                                         1
31                  1                                                               1
32                                                             1                    1

Total              2                     1                  1                     4

I have added the field 'Age' as the row group and 'Diagnosis' as the column group. Age has values 29, 30, 31, 32... and Diagnosis has values Grade1, Grade2 Grade3.....In the report builder, I would like to group based on the row values(grouping on 'Age') and I would like my report to be displayed like below. Any help is grately appreciated. Many Thanks.

Age             Grade1        Grade2          Grade3          Total
0-30                  1                    1                                        2
31-40                1                                        1                    2

Total                  2                    1                  1                    4
2 Solutions
udaya kumar laligondlaTechnical LeadCommented:
create a table which will have the age range values and the grade values in SQL. use the table in the reporting server.
you can not create a range in Reporting server.
pnadakuditiAuthor Commented:

I was able to find a solution for this.. I basically edited the formula for the row group 'Age' using a switch statement to look like this...

SWITCH(AND(Age >=0, Age <=30), "0-30", AND (Age >=31, Age <=40), "31-40", AND(Age >=41, Age<=50), "41-50")

Thanks for your time.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now