# Matrix column grouping

With SSRS 2005, is it possible for a row to be included in more than one matrix column?  Using the column grouping expression below, the S1 and S2 values only appear in the first 2 columns.  Just curious before I scrap the matrix and go with a table instead.

Rows:
A = 1
B = 1
C = 2
D = 0
E = 0
F = 0
S1 = .5
S2 = .5

Matrix Column Group Expression examples:

Attempt 1:
=iif(some.Value), " ", switch(
Fields!some.Value = "A" or Fields!some.Value = "S1", ColGrp1,
Fields!some.Value = "B" or Fields!some.Value = "S2", ColGrp2,
Fields!some.Value = "C" or Fields!some.Value = "S1" or Fields!some.Value = "S2", ColGrp3,
Fields!some.Value = "D", ColGrp4,
Fields!some.Value = "E", ColGrp5,
Fields!some.Value = "F", ColGrp6))

Attempt 2:
=iif(Fields!some.Value = "A" or Fields!some.Value = "S1", 1,
iif(Fields!some.Value = "B" or Fields!some.Value = "S2", 2,
iif(Fields!some.Value = "C" or Fields!some.Value = "S1" or Fields!some.Value = "S2", 3,
iif(Fields!some.Value = "D", 4,
iif (Fields!some.Value = "E", 5,
iif(Fields!some.Value = "F", 6, " "))))))

Results:

ColGrp1      ColGrp2      ColGrp3      ColGrp4      ColGrp5      ColGrp6
Values            1.5      1.5         2          0          0            0

Required Results:

ColGrp1      ColGrp2      ColGrp3      ColGrp4      ColGrp5      ColGrp6
Values            1.5      1.5          3          0          0          0
LVL 1
###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SQL Server ConsultantCommented:
I think what you want can probably be done, but I am having trouble visualizing your question in a reasonable amount of time. There is a lot of flexibility in the matrix data region through creating  multiple row and column groups, and possibly through hiding and showing text boxes (though SSRS 2008 is better at hiding and showing correctly).

A picture might help, such as a spreadsheet example of what you want the matrix report to look like. It might also help if you could distinguish between query rows and columns and matrix rows and columns in your question.

Experts Exchange Solution brought to you by