# Database Discussions > Reporting Services >  Conditional formating based on two diferent fields values

## Databasico

Hello,

I have created a report on Report  Builder 3.0 that has a structure similar to the following example

Event ID,    Event Date,     Participant ID,   Event Class ....

1728          01/24/2012       1701                A23

                  01/25/2012       1042                A23

                  01/26/2012       1903                R15

2015          03/18/2012       2380                Z10

                  03/19/2012       2489                X44

                  03/20/2012       3012                Z10

In this query, the transactions are grouped by Event ID. An event could last many days and have many participants with unique Participant IDs. However, the one constant is that all transactions for the same event must be coded with the same Event Class. In our case, the Event Class code given to the first instance of an Event Date should dictate what the Event Class code should be coded as for the remaining transactions under the same Event ID.

In the above example (Event ID 1728) the last Event Class is different from the first (or earliest) entry under that same Event ID. The same is true for the second transaction on Event ID 2015.

I would like to know how to write an expression in the field color value that will create a conditional formatting to turn the Event Class red if any transaction posted after the first one for that event has a different Event Class value. In this example, both R15 and X44 are anomalies that should appear in red for us to correct them in the database.

Thank you so much for your assistance.

Regards,

Manuel

----------

