[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 327
  • Last Modified:

ms access query help to perform davg

I need to be able to perform a running average on a column ("IncomingPercent"---number field) based on "WeekEnding", which is a date field.  I have attached the query data output and the query (as a pic and the actual SQL statement).  Really could use expert help with this.  Thanks.


SELECT dbo_InspectionEfficiency.WeekEnding AS WeekEnding, Avg(dbo_InspectionEfficiency.IncomingPercent) AS Incoming, DAvg("IncomingPercent","dbo_InspectionEfficiency",[WeekEnding]<="#" & [WeekEnding] & "#") AS Expr1
FROM dbo_InspectionEfficiency
WHERE (((dbo_InspectionEfficiency.WeekEnding)>=DateSerial(Year(Date()),1,1) And (dbo_InspectionEfficiency.WeekEnding)<DateAdd("d",1,testsat(Date()))))
GROUP BY dbo_InspectionEfficiency.WeekEnding
ORDER BY dbo_InspectionEfficiency.WeekEnding;
1.gif
2.gif
0
sxxgupta
Asked:
sxxgupta
1 Solution
 
als315Commented:
At least you should change
[WeekEnding]<="#" & [WeekEnding] & "#"
to
"[WeekEnding]<=#" & [WeekEnding] & "#"
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now