Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Matrix Color Coding

Status
Not open for further replies.

jmk418

MIS
May 24, 2004
99
US
Hey all,
I am using Reporting Services 2005. I have a matrix that lists months across the top and counties down the side. The report shows the percentage of referrals for each month. Example below:
Jul Aug Sep
County 1 20% 30% 25%
County 2 40% 20% 25%
County 3 40% 50% 50%

What I would like to change the color of the field based on whether the percentage is greater or lesser than the previous month.
I would like the above matrix to look as follows:
Jul Aug Sep
County 1 20% 30%[/color green] 25%[/color red]
County 2 40% 20%[/color red] 25%[/color green]
County 3 40% 50%[/color green] 50%

I am not sure how to pull the data from the previous field to compare it to the current field as the matrix is being built. Any help would be greatly appreciated.
Thanks

Jeremy
 
In the Color expression:

Code:
=iif(Previous(Fields!SomeField.Value) <= Fields!SomeField.Value, "Green", "Red")
 
Thanks for the reply. I do not have separate field for each month to specify. I am using the below code to calculate the percentage:
Code:
=Sum(Fields!County1.Value) / Count(Fields!Casenum.Value)

Each month is calculated using the above code and grouped by the month and year group at the top of the matrix.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top