Link to home
Start Free TrialLog in
Avatar of janhoedt
janhoedt

asked on

SSRS: color cell complex query

Hi,

I'd need a sql query to color code a date:
Items = status NOT equal to 'Status01', 'Status02'
For all items which have date less then a week => green
older then a week => orange
older then 2 weeks => red
Items which have Status Status03
and have date
older then 2 weeks orange
older then a month red

Thanks for helping with the approach!

J
Avatar of lcohan
lcohan
Flag of Canada image

I believe that can be done via Data Driven Colored Text  as explained here https://www.mssqltips.com/sqlservertip/2612/data-driven-colored-text-for-reporting-services-reports/ and all needed is to focus on the
=SWITCH(Fields!Pay.Value <= 10, "Red", Fields!Pay.Value >= 20, "Green")

Open in new window

where you need to place your actual date column criteria.
Avatar of janhoedt
janhoedt

ASKER

Thanks, but that s nowhere near to what my query should look like :-(
Can you help building the query syntax using dates?

Something like
=SWITCH(Fields!date.Value <= today-14, "Red", Fields!date.Value <= today-7, "Green")
Then if Fields.status stayus03 and date <=
ASKER CERTIFIED SOLUTION
Avatar of lcohan
lcohan
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial