Hi, I am creating a report which needs to calculate the %change from the previous month. I have tried using a nested query which tries to take the value from the previous month and then the current month to get the % change. The issue is the output is in the wrong place. Any help will be much appreciated.
Thank you
Thank you
Code:
SELECT [Data Research].[Date of Request] AS [Month], [Data Research].[Number of Requests] AS [Total Requests], [Data Research].[Number of Items Requested] AS [Total Items], [Data Research].[Number added to DCS] AS [Items Found], Format(([Number added to DCS]/[Number of Items Requested])*100,"Fixed") AS [% Found], [Data Research].[DCS Assigned] AS [Number Migrated], [Data Research].[DCS Backlog] AS Backlog, Format(((((Select [Data Research].[DCS Backlog] FROM [Data Research] WHERE Year([Date of Request])* 12 + DatePart("m", [Date of Request]) = Year(Date())* 12 + DatePart("m", Date()) - 1)/[Data Research].[DCS Backlog])-1)*100), "fixed") AS [Backlog % increase/decrease]
FROM [Data Research];
Comment