I have a query that pulls data that results in weekkly grouped results. It pulls data results and averages them to a weekly average. The problem I have is that I must also show percentage difference between the weeks...ie.
if week 1 is 20% and week 2 is 45% then there is a percentage increase of 225%(winging the math here). How do I access the previous rows data for calculations like this or if there is a way, please let me know. The query is listed below, don't know if it helps.
Thanks,
Mike
SELECT IOC_Rate_base_qry.[Team Lead], IOC_Rate_base_qry.[Remote-Deskside], Min(IOC_Rate_base_qry.Date) AS [Week Beginning], IOC_Rate_base_qry.[Remote-Deskside], Sum(IOC_Rate_base_qry.[# of Obs]) AS [SumOf# of Obs], Avg(IOC_Rate_base_qry.InterviewRate) AS AvgOfInterviewRate, Avg(IOC_Rate_base_qry.OfferRate) AS AvgOfOfferRate, Avg(IOC_Rate_base_qry.CloseRate) AS AvgOfCloseRate
FROM IOC_Rate_base_qry
GROUP BY IOC_Rate_base_qry.[Team Lead], IOC_Rate_base_qry.[Remote-Deskside], IOC_Rate_base_qry.[Remote-Deskside], (Year([Date])*CLng(54)+DatePart("ww",[Date],0)-1), (Format([Date],"ww"" '""yy"
)
ORDER BY IOC_Rate_base_qry.[Team Lead];
if week 1 is 20% and week 2 is 45% then there is a percentage increase of 225%(winging the math here). How do I access the previous rows data for calculations like this or if there is a way, please let me know. The query is listed below, don't know if it helps.
Thanks,
Mike
SELECT IOC_Rate_base_qry.[Team Lead], IOC_Rate_base_qry.[Remote-Deskside], Min(IOC_Rate_base_qry.Date) AS [Week Beginning], IOC_Rate_base_qry.[Remote-Deskside], Sum(IOC_Rate_base_qry.[# of Obs]) AS [SumOf# of Obs], Avg(IOC_Rate_base_qry.InterviewRate) AS AvgOfInterviewRate, Avg(IOC_Rate_base_qry.OfferRate) AS AvgOfOfferRate, Avg(IOC_Rate_base_qry.CloseRate) AS AvgOfCloseRate
FROM IOC_Rate_base_qry
GROUP BY IOC_Rate_base_qry.[Team Lead], IOC_Rate_base_qry.[Remote-Deskside], IOC_Rate_base_qry.[Remote-Deskside], (Year([Date])*CLng(54)+DatePart("ww",[Date],0)-1), (Format([Date],"ww"" '""yy"
ORDER BY IOC_Rate_base_qry.[Team Lead];