# Matrix report grouping ???

### Question

• Hi

Im not sure if I titled this corectly... but

I have a matrix report which is by clientname and Rday(which is the dayof month an R or S is in a field)

R takes precidence over S if there are both on the same day

The user has a parameter for choosing just R , S or both

I setup the SP sort so if Both is chosen the R is on top if on the same day

So it works OK, if user chooses R its shows R's if S shows S's, if B it show either but if there is an R and S on that day it show R.

Here is what I want(After all that!!)

if a user has two records on that day an R and an S show B

do I need a child group then hide and use the report!Item or on that idea?

here is an example

1    2     3   4  5 .... days of month

John Adams        R   S      R   R  S  .....

because of the sort the 4th shows R but actually two records an R and an S and would like to show B

Thanks ..

Joe

Thursday, September 26, 2013 8:41 PM

• Hi Joe,

If I understand correctly, you want to display “B” instead “R”, if a user has R and S value on that day.

We can use the below expression to get the result:
=IIF(Count(Fields!Clientname.Value)>1,"B",Fields!Rday.Value)
You can refer to the screenshot below:

If there are any misunderstanding, please feel free to let me know.

Regards,
Alisa Tang

Monday, September 30, 2013 3:20 AM

### All replies

• I would do the logic in the underlying query if at all possible.  But if you can't do that, you can use this expression in the value field of your matrix:

=Iif(First(Fields!Value.Value)=

"R" AND Last(Fields!Value.Value)="S","B",Fields!Value.Value)

Martina White

• Proposed as answer by Saturday, October 26, 2013 3:30 PM
Monday, September 30, 2013 2:15 AM
• Hi Joe,

If I understand correctly, you want to display “B” instead “R”, if a user has R and S value on that day.

We can use the below expression to get the result:
=IIF(Count(Fields!Clientname.Value)>1,"B",Fields!Rday.Value)
You can refer to the screenshot below:

If there are any misunderstanding, please feel free to let me know.

Regards,
Alisa Tang

Monday, September 30, 2013 3:20 AM