A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Averaging Hourly Data



 
 
Thread Tools Display Modes
  #1  
Old May 17th, 2010, 11:17 PM posted to microsoft.public.access.queries
Jake D[_3_]
external usenet poster
 
Posts: 1
Default Averaging Hourly Data

I have a lot of weather data for one month that is broken down by the minute.
My end goal is to take the average hourly value of the column values (temp,
humidity, etc.) and create one hourly averaged data point for each column.

So, I am having trouble averaging integer values that occur multiple times
within the same day and hour. Would like to apply this query to the entire
table to average all integers for each day and hour. There are typically
about 25 data points per hour (this number varies), for 31 days in August. I
need to have one average hourly data point for every day in the month.

Any help would be appreciated!

Thanks.
  #3  
Old May 18th, 2010, 08:14 PM posted to microsoft.public.access.queries
Jake D[_4_]
external usenet poster
 
Posts: 1
Default Averaging Hourly Data

John-

Thanks for the tip, getting the date into that format was definitely the
key. I struggled with the syntax for the group by stuff for a bit, but
finally figured it out:

SELECT Format([Date/Time],"yyyymmddhh") AS [Date Time], Avg([Hourly Data:
Table].Temperature) AS [Temperature F], Avg([Hourly Data: Table].Humidity) AS
[Humidity %] INTO Boise_Aug_Avg_Hourly_Information
FROM [Hourly Data: Table]
GROUP BY Format([Date/Time],"yyyymmddhh");

This worked out perfectly for me, thanks again!

-jake

"John W. Vinson" wrote:

On Mon, 17 May 2010 15:17:01 -0700, Jake D Jake
wrote:

I have a lot of weather data for one month that is broken down by the minute.
My end goal is to take the average hourly value of the column values (temp,
humidity, etc.) and create one hourly averaged data point for each column.

So, I am having trouble averaging integer values that occur multiple times
within the same day and hour. Would like to apply this query to the entire
table to average all integers for each day and hour. There are typically
about 25 data points per hour (this number varies), for 31 days in August. I
need to have one average hourly data point for every day in the month.

Any help would be appreciated!

Thanks.


Try putting a calculated field in the query:
ByTheHour: Format([datefield], "yyyymmddhh")

This will have values such as 2009082111 for 11:00-11:59:59 AM August 21, and
you can use it as the GROUP BY field in a totals query.

--

John W. Vinson [MVP]
.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:32 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.