Reputation: 137
I'm trying to get a Today vs This Day Last Year Comparison Report sorted.
I set a 'From'
and 'To'
date based on a 'Preset'
parameter.
So if it is set to 'This Week'
it sets the start date to Monday and the end date to Sunday.
What I want now is a Today vs This Day Last Year. So for example, if i were to do it for today, I would get 09/04/2015
vs 10/04/2014
. So as today is Thursday, I want the nearest Thursday from 09/04/2014
.
Also want the same for 'Yesterday'
. So 08/04/2015
vs 09/04/2014
Is there a way to do this in either the Parameters SSRS expression, or within the custom 'Code' section?
Upvotes: 0
Views: 1397
Reputation: 36
To get this day last year, you can just subtract 52 weeks from today. Try this expression: =DateAdd("ww",-52,Today()). Likewise you can subtract 1 day from today to get yesterday: =DateAdd("d",-1,Today()).
Upvotes: 2