Microsoft
Software
Hardware
Network
Question : MS Access calculate rolling 12 month average
In an Access query how do I calculate a rolling 12 month average for a field that contains numerical data such as 1, 2, 3. The fields are Date (month/year), number of injuries, and the 3rd column will contain a rolling 12 month average for the past 12 months.
Answer : MS Access calculate rolling 12 month average
Use a criterium like:
where [YourDateField] between DateAdd("yyyy", -1, Date()) and Date()
If [YourDateField] is not of data type Date you will have to convert it to a valid date value using DateValue or DateSerial.
/gustav
Random Solutions
Populate listbox with Outlook MAPI folder messages
is there a difference between C++ in visual studio 2008" and "visual C++ 2008"
Nnotes.dll API Create Empty Replica Stubs through VB.NET 2008
Determining the application folder at runtime (VB.NET)
Microsoft Great Plains V10 Compliant to SOX
Upgrade from Win2003 R2 to Win 2008
Script for truncating file and folder names
Multiple Consoles in C# .Net
File System Task to rename file giving failed to lock variable error
windows 7 remote desktop