Is it possible in reporting services to do the following:
I have a tabular report with months going across, and sales person going
down, the data shows the total sales value for each salesperson for each
month.. this I can do and is easy :-)
The tricky part that I have not worked out is this:
For an individual sales person: if a months sales value is less than the
previous month then I need the cell background to be red, if the value is
higher than the previous month then I need the cell background to be green.
Thanks,
Ricci.I am assuming you are using a matrix.
This is possible under fairly restrictive conditions:
* The query must return data in the following form:
Salesperson Month MonthlySales
Joe Jan 100
Joe Feb 101
Joe Mar 99
Mary Jan 200
Mary Feb 199
Mary Mar 201
* All aggregations must be done in the query and not in the Matrix
* Data must be sorted by salesperson and month in the query
Once these conditions are meet you can add the following expression to
background color property for the matrix cell that contains the monthly
sales:
=iif(Fields!Salesperson.Value = Previous(Fields!Salesperson.Value),
iif(Fields!MonthlySales.Value < Previous(Fields!MonthlySales.Value),
"Red", "Green"), "White")
Improvements to the Previous() method are currently under consideration for
inclusion in a future release.
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Ricci Hammond" <ricci@.riccisoft.nospam.co.uk> wrote in message
news:uC0HnjbXEHA.1048@.tk2msftngp13.phx.gbl...
> Is it possible in reporting services to do the following:
> I have a tabular report with months going across, and sales person going
> down, the data shows the total sales value for each salesperson for each
> month.. this I can do and is easy :-)
> The tricky part that I have not worked out is this:
> For an individual sales person: if a months sales value is less than the
> previous month then I need the cell background to be red, if the value is
> higher than the previous month then I need the cell background to be
green.
> Thanks,
> Ricci.
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment