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 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 . 

Comments

Post a Comment

Popular posts from this blog

SQL Server MDS : How to Know Actual MDS Table name for Model Entity and Column name for the Attribute

SSRS : [Teradata Database] 3939 There is a mismatch between the number of parameters specified and the number of parameters required.

SSAS Error : XML parsing failed at line 1, column 0: A document must contain exactly one root element