January 14, 2016 at 8:04 am
Hi everyone
I wonder if someone can help.
I have a very basic SSRS Matrix report that shows Sales by Store for the year. So in other words the report comprises of the following: Row Groups: Fields!Store.Value, column groups: Fields!SaleDate.Value and the report detail shows the Fields!Sales.Value.
What I want to do is compare the current month with the previous month and if sales are higher or lower then highlight this in the background color of the report ie if sales in December were higher than November then color the background in green otherwise color the background in red.
Is this possible or would I need to do something in the SQL before bringing it into SSRS?
Thanks in advance.
BO
January 14, 2016 at 9:00 am
I would do it in the SQL - join the table to itself on month -1 & then you can make the comparison
January 14, 2016 at 3:01 pm
Cheers Laurie
I guess it's always better to do these things in T-SQL rather than SSRS.
BO
January 14, 2016 at 10:06 pm
Using t-sql filter the month
SELECT *
FROM tableName
WHERE month(date2) = month(getdate())
January 15, 2016 at 3:05 am
Thanks John - got the report working the way I want it to.
BO
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply