SSRS : How to Show Past 5 weeks data on weekly Basis
I just want to show you how to design your Report if the Requirement is to show last 5 weeks data from the day the user selected Date ( default is current day ).
Step 1 : Create Parameter SelectDate with Data Type Date/Time and Its Default value
=today()
Step 2 : Create Paratemeter StartDate with DataType Date/Time and Make it Hidden and Its Default value is
DateAdd
("d",-35,Fields!BirthDate.Value)Step 1 : Create Parameter SelectDate with Data Type Date/Time and Its Default value
=today()
Step 2 : Create Paratemeter StartDate with DataType Date/Time and Make it Hidden and Its Default value is
DateAdd
Step 3 : Create Dataset with Fallowing Query i am just taking sample columns
select convert(varchar(10),DATEADD(DAY, 1-DATEPART(WEEKDAY, DateColumn), DateColumn),103) as [week], Measure from TableName where DateColumn Between @startDate and @SelectDate
Step 4 : In the graph select Week In Category Groups and Measure column in Measure values section and Make Sure In Series Properties The Value Filed should have SUM aggreative function on Measure column .
Very Useful
ReplyDelete