group by month and week in SSRS graph
I have a got a line graph report in SSRS 2008 R2. when I do the grouping in graph I first group by year, then month, then week and I get Sum(Count) as data value.(see below)
Count Date Week Month Year
10 datex 26 6 2010
15 datey 26 7 2010
However, if I have a piece of d开发者_如何学Cata as above, week numbers are duplicated and graph finds dip in one of them. it is because dates belong to same week but different month.
Is there any way to get this around? I am sure it is a known problematic, but could not find much on the internet.
Edit: here is the graph I get
Thanks for your help.
Before you calculate week/month, adjust the date so that everything that has happened in a week is moved to a specific day in the week (say Wednesday).
For 2010, Jun 30 was a Wednesday, so everything between Jun 28 and Jul 4 would be moved to Jun 30. The week would then be 26, and the month June. The datapoint for week 26 and July will then disappear.
This link might help:
How to get last day of last week in sql?
精彩评论