I need to calculate the rate of change in drug usage between two dates using SSRS. I am used to using SQL, therefore I am having a difficult time with SSRS.
I have the following information:
Avg_Alcohol_Use_Month Avg_Drug_Use_Month
First_interview_Date 1.63% 1.34%
1/30/2017
Followup_interview_date 2.58% .80%
6/30/2017
How do I create a report that reflects the rate of change in drug usage between two dates? I need to create the report in SSRS but, I don't know how to write a query in SSRS that will reflect the rate of change.
I cannot create the query in SQL because I only have access to the data through SSRS.
(This example is for SQL Server)
You can do it in SQL if you save the initial results in a table or a temp data structure. If you subquery, you can subtract the line's rates by the previous line's rate. This is by date, so you chose the MAX(date) for the given patient/doctor, whatever that (Primary Key?) is. In this case I have used "PatientID" to identify the patient. See below:
Use such a query as the dataset for SSRS.