By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,921 Members | 1,433 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,921 IT Pros & Developers. It's quick & easy.

Averaging Hourly Data by 24-HR Daily Rate

P: 1
Dear Access Gurus!

I have a database that I am building for work (I work in the oil industry) that contains hourly production rates for newly producing units. The collums have all of the data for each unit by the hour including: pressure, water produced, and choke size at the hour its recorded.

I would like to find when the unit producing reaches its highest 24 hour rate. I can manually get these results in excel, but I am having to filter individually on the unit, sum up the last 24 hrs for each additional hour of data, then find the max rate and extract that exact hours information (pressure, choke, and water). I feel there has to be a way to set up a macro in access that I can run at the start of each week to pull this data.

Thanks in advance!
Nov 11 '13 #1
Share this Question
Share on Google+
3 Replies

P: 294
Have you tried the DMax function?

Functions fairly similar to the Min/Max as seen in Excel. Just make sure you filter what you need to.
Nov 11 '13 #2

Expert Mod 15k+
P: 31,492
Does the daily rate that you want go from midnight to midnight? Or is it any 24 hour period, no matter when it starts?
Nov 11 '13 #3

Expert Mod 5K+
P: 5,397

Depending on how your data is structured, you may be able to do this using various methods that may not even need to use VBA (^-^).

However, it is very difficult to offer you any advice as to a specific function or method in either Excel or Access without seeing the information and without the information that Neopa has asked for...

Can you provide us a VERY small example of your data, just enough that we can get the feel and maybe do one or two rounds of calculations?

You can use generic names like "well_1" and "loc_1" to protect your company name. If you need you can also use fake times and other data; however, even these need to reasonably close to what you would expect.

If you select the formated text and then click the [CODE/] formating button in the toolbar your data table format will hold somewhat so that row headers and records will be more easily followed.

It is prefered that such information be typed into a post (or cut and paste) instead of as an attachment because many of us are not able to open or download files from the internet while at work.

If you can show us an example of the goal you are after that will also help.

also, would you prefer to stay in Excel or move to Access? Honestly, Access may be the better choice in the long run. There is a reason Labs use databases to hold our testing results (^-^)
Nov 14 '13 #4

Post your reply

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