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

SSAS : A connection cannot be made to redirector. Ensure that 'SQL Browser' service is running. (Microsoft.AnalysisServices.AdomdClient). + Solution

SSIS Error : Unable to infer the XSD from the XML file. The XML contains multiple namespaces