I simply want the x-axis to show week numbers from start date to end date (start and end dates are parameters). Is this even possible in SSRS 2012?
Asked
Active
Viewed 643 times
0
-
Please add some code so we can see what you have tried so far – MiBrock Jul 01 '15 at 10:18
-
Any data would do. The only requirement is to have week of the year numbers show on x-axis instead of dates, based on two parameters start and end date – BeyondLogic Jul 01 '15 at 10:37
-
Using SQL you could use SELECT DatePart(DayOfYear,'7/1/2015') / 7 However, that will give you the actual week of the year not the calendar week. – Mike Jul 01 '15 at 12:20
-
It is possible but it wouldn't be useful. You would create a dataset that uses your parameter to create a list of week numbers from Start to End date using CTE - http://stackoverflow.com/questions/7812986/. I think what you really need is to add all the weeks to your data - http://stackoverflow.com/questions/17451230. – Hannover Fist Jul 01 '15 at 17:23
1 Answers
0
Not quiet sure what you want to achieve. If you want to build an empty chart with week number generated from your report parameter, you can add a dataset into your report, with tsql codes below
set datefirst 1
;with cte as
(
select @FromDate as d
UNION ALL
select Dateadd(DAY, 1, d)
from cte
where d < @ToDate
)
select d, DATEPART(WEEK, d) as dw
from cte

cqi
- 539
- 3
- 13