extract desired data

AN60

Registered User.
Local time
Today, 13:45
Joined
Oct 25, 2003
Messages
283
I have a simple tbl for rainfall with a date field & amount of precipitation going back about 25 years up to present and beyond. I want to view the data by month and by year eg monthly averages and totals and yearly averages and totals. Does anyone have any suggestions how I should do this?
 
i would suggest using group by query's ....
 
You'll need two queries, one's going to be for Month, the other for Year. For the Month, you want to use the Month() function and pass your Date Field into the Function:
Code:
Month([Your_Date_Field])
You want to get an average over the month, so what you're needing to do is count the number of recorded days within that month, sum the rainfall, and then divide the Sum by the Count. You can do all this within one query using a Subquery or you can write your first query to Group By Month, Sum Rainfall, Count Days and then base another query off of this query and simply pull down the Month field and define a second field as:
Code:
[Sum_Rainfall_Field]/[Count_Days_Field]

Ditto for your Year query except Group By using the Year() function.
 

Users who are viewing this thread

Back
Top Bottom