473,414 Members | 1,988 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,414 software developers and data experts.

Calculating Moving Average For Previous 12 Records

I've read most, if not all, of the posts on moving average and still
can't find a simple solution to my problem (if a simple solution
exists!) I have a table with 2 fields: Hours and Injuries. I have a
query based on this table which shows these 2 fields and calculates a
third field: Frequency Rate, based on a formula which uses the Hours
and Injuries fields.

Is there a simple way of A: using yet another calculated field in the
query (or yet another query based on this one) to average the last 12
values of Frequency Rate for any given record to give a 12 month
moving average?

or B: Achieve the same end by performing a calculation in a text box
of a form based on this query?

Any help would be greatly appreciated.
Nov 12 '05 #1
2 13577
Hi Wayne,

Have you found this sample on the Microsoft KB and tried it out yet?

ACC2000: How to Compute Moving Averages in Visual Basic for Applications
http://support.microsoft.com/?id=210138
Tom

___________________________________________

"Wayne Aprato" <cq*******@volcanomail.com> wrote in message
news:4d**************************@posting.google.c om...

I've read most, if not all, of the posts on moving average and still
can't find a simple solution to my problem (if a simple solution
exists!) I have a table with 2 fields: Hours and Injuries. I have a
query based on this table which shows these 2 fields and calculates a
third field: Frequency Rate, based on a formula which uses the Hours
and Injuries fields.

Is there a simple way of A: using yet another calculated field in the
query (or yet another query based on this one) to average the last 12
values of Frequency Rate for any given record to give a 12 month
moving average?

or B: Achieve the same end by performing a calculation in a text box
of a form based on this query?

Any help would be greatly appreciated.
Nov 12 '05 #2
"Tom Wickerath" <AO***********************@comcast.net> wrote in message news:<EM********************@comcast.com>...
Hi Wayne,

Have you found this sample on the Microsoft KB and tried it out yet?

ACC2000: How to Compute Moving Averages in Visual Basic for Applications
http://support.microsoft.com/?id=210138
Tom

___________________________________________

"Wayne Aprato" <cq*******@volcanomail.com> wrote in message
news:4d**************************@posting.google.c om...

I've read most, if not all, of the posts on moving average and still
can't find a simple solution to my problem (if a simple solution
exists!) I have a table with 2 fields: Hours and Injuries. I have a
query based on this table which shows these 2 fields and calculates a
third field: Frequency Rate, based on a formula which uses the Hours
and Injuries fields.

Is there a simple way of A: using yet another calculated field in the
query (or yet another query based on this one) to average the last 12
values of Frequency Rate for any given record to give a 12 month
moving average?

or B: Achieve the same end by performing a calculation in a text box
of a form based on this query?

Any help would be greatly appreciated.


Thanks Tom. No, I hadn't seen this article. I've tried the example
and it works well. I should now be able to modify it to my specific
application.

Regards.
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Stephen Miller | last post by:
Firstly, sorry for the long post, but I've included a fair bit of sample data. Im doing a comparision of 10yr Bond prices and CPI adjustments, with an 18 week moving average of the CPI. I'm...
1
by: Sumon | last post by:
Can some one please help me on this? I got 2 records by individual with some fileds, one associates with the min date and the other one assocaites with max date. So lay out looks as follows: ...
3
by: Wired Hosting News | last post by:
Lets say I have 10 products in 10 different stores and every week I get a report from each store telling me how many items they have left for each of the 10 products. So each week I enter in 100...
5
by: Wired Hosting News | last post by:
I tried to be breif and give a scenario so as not to be overlooked because it was soooo long. Let me give you real world. I am a manufacturer of goods and produce 11 items that are distributed...
1
kmartinenko
by: kmartinenko | last post by:
I have a table with over 12,000 entries. I have created a form (with the help of this forum) that will return the search results based upon the stop and stop time selected. See post...
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...
4
by: zoeb | last post by:
Hi. I have a form which the user enters 2 years worth of data into (one record per year). The aim, is to populate the table this form is based on with 3 more years worth of data (i.e. creating 3...
1
by: Michel | last post by:
Hello, I need to calculate moving averages of weekly data during the last year. After some search, I believe that the best approach will be to get a dataset from the SQL Server database, browse...
1
by: cmb3587 | last post by:
My code runs fine for the most part...the only time it fails is when I type in a negative to end the array. I don't want the negative number to be included in the array and I thought that is what...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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.