473,411 Members | 2,031 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

Running Average in MS ACCESS Query.

Hello,

I have actually asked this before but can't find it on the site (I'm still new here). I have got numerical data coming into my database twice a day for each specific subject that is being measured. When my project gets going it will continue for > 6 months so it will be a lot of data in the end. I need to create a running average of the numerical data for each subject for the last 7 days. This needs to be a continous evaluation and not just once off. I need the running average for that subject every day. Can anybody help me with this. I have tried using "Todays Date" - 7 days in a query but that doesn't account for days not measured (eg weekends) What I need is the last 7 "Measured" days.

Thanks for your help in advance,

John
Mar 12 '07 #1
3 3409
Rabbit
12,516 Expert Mod 8TB
In the criteria
Expand|Select|Wrap|Line Numbers
  1. >= iif(Day(Date()) = 2, Date - 11, Date - 9)
Mar 12 '07 #2
MMcCarthy
14,534 Expert Mod 8TB
Hello,

I have actually asked this before but can't find it on the site (I'm still new here).
John

To find your previous posts either go to control panel at top RHS of page and look in List Subscriptions or click on your name to take your into your profile where you will be able to access a list of all questions and all posts.

Mary
Mar 12 '07 #3
NeoPa
32,556 Expert Mod 16PB
Hello,

I have actually asked this before but can't find it on the site (I'm still new here). I have got numerical data coming into my database twice a day for each specific subject that is being measured. When my project gets going it will continue for > 6 months so it will be a lot of data in the end. I need to create a running average of the numerical data for each subject for the last 7 days. This needs to be a continous evaluation and not just once off. I need the running average for that subject every day. Can anybody help me with this. I have tried using "Todays Date" - 7 days in a query but that doesn't account for days not measured (eg weekends) What I need is the last 7 "Measured" days.

Thanks for your help in advance,

John
John,

Your previous thread on the subject (Running Average).
I suspect that if you provide us with details of how your data is stored (Table MetaData) then someone could give you some help returning this information in a query. An example layout for the MetaData follows :


Table Name=tblStudent
Expand|Select|Wrap|Line Numbers
  1. Field; Type; IndexInfo
  2. StudentID; AutoNumber; PK
  3. Family; String; FK
  4. Name; String
  5. University; String; FK
  6. Mark; Numeric
  7. LastAttendance; Date/Time
Mar 13 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Stephen Miller | last post by:
Hi, I am trying to add a staggered running total and average to a query returning quarterly CPI data. I need to add 4 quarterly data points together to calculate a moving 12-month sum (YrCPI),...
8
by: nickdu | last post by:
I'm trying to isolate "applications" into their own application domain within a single process. I've quoted applications because it's a logical representation of an application. Basically it...
2
by: Karen | last post by:
I inserted this statement and it worked great for the customers that have no payment history, but for the customers that have a history and an open invoice, it still used today's date in the mix...
2
by: akantrowitz | last post by:
I have a asp.net 2.0 page that runs a large DB query on the Page_Load event. This is needed because it generates an array of pictures that are then dumped out onto the webpage. Is there any way...
3
by: mochatrpl | last post by:
I am looking for a way to make a query / report display the running average for total dollars. I have already set up a query to provide totals dollars per day from which a report graphly shows...
3
by: Richard Hollenbeck | last post by:
I hope this isn't too confusing. The following query runs pretty fast by itself, but when I want to use it in a report (pasted below the query), it takes at least fifteen seconds to run! Then I...
0
by: SuzK | last post by:
I am trying to calculate in VBA in Access 2002 a moving average and update a table with the calculations. Fields in my WeeklyData table are Week Ending (date) ItemNbr (double) Sales Dollars...
1
by: MLH | last post by:
I've seen suggestions showing how to display running averages on reports in this NG, but not too much on displaying them with a query. I'm wondering if it's just not possible, or if it's just not...
12
by: denveromlp | last post by:
Hello, I'm new to Access and trying to calculate a rolling 12 month average from some time data. Each data point is a date and a measurement taken at that date. As far as I can tell, the only...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.