Quantcast
Channel: SQLServerCentral » Reporting Services » Reporting Services » Latest topics
Viewing all articles
Browse latest Browse all 2791

SSRS need filter expression: datepart(dateinterval.month,activity_date) < datepart(dateinterval.month,now)

$
0
0
I have a simple table having one column of data, which I group on Year. I want two filters on the parent Year group. (1) this first filter works. It returns data only for year(now)-1 ie. last year(2) I also need a filter that returns only data for months where the MonthNumber is less than the MonthNumber of the current month/year ie. less than Sep. Next month the current month will be Oct, so I want all months of the prior year that are less than Oct. I have a MonNo column that is INT, so I should allow for comparing with datepart(dateinterval.Month, now). My report still returns a sum of all data for the whole of the past year.How to write expression for the (2) filter?

Viewing all articles
Browse latest Browse all 2791

Trending Articles