Results 1 to 3 of 3
  1. #1
    JGtz is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jan 2016
    Posts
    2

    Combining data within minute

    Hi, new here. And an Access rookie

    I have created an Access database to help me filter out some data from meteorological equipment that records Wind speed, sun irradiance, and temperature.

    I have data that has been recorded every 15 seconds every day for 7 days. So I have 5,760 data points per day with the above data.

    Now I have to combine the values within each minute and average them out. To create a new table with 1,440 data points with averaged out wind speed, irradiance, and temperature for each minute.

    Example 3 minutes of Original data:
    Date Irradiance wind speed air temperature
    1/18/16 11:27:00 AM
    678.22 28.94 130.00
    1/18/16 11:27:15 AM
    692.99 40.61 130.00
    1/18/16 11:27:30 AM 734.09 35.58 130.00
    1/18/16 11:27:45 AM
    728.59 39.79 130.00
    1/18/16 11:28:00 AM 720.56 38.15 130.00
    1/18/16 11:28:15 AM 716.03 37.05 130.28
    1/18/16 11:28:30 AM 708.85 38.48 131.00
    1/18/16 11:28:45 AM 694.24 38.65 131.00
    1/18/16 11:29:00 AM 644.35 33.78 131.00
    1/18/16 11:29:15 AM 550.85 43.90 131.00
    1/18/16 11:29:30 AM 594.44 34.62 132.10
    1/18/16 11:29:45 AM 624.47 43.19 133.00


    I'd need to access to create a new table that has something like this (I average out the 4 data points within each minute manually):
    Date Irradiance wind speed air temperature
    1/18/16 11:27:00 AM


    708.47 36.23 130.00
    1/18/16 11:28:00 AM 709.92 38.08 130.57
    1/18/16 11:29:00 AM 603.53 38.88 131.78

    At which point I can then create another query and filter that data based on other simple parameters.

    My question is, is this possible in Access? And can it be done via a Create a Table query and then some grouping criteria? Or will I require some script to accomplish this task.

    Thanks for any help/pointers!

  2. #2
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,927
    leaving aside that Date is a reserved word and using it can cause issues (so I will give it the name ReadDT) sql along the following lines should work. There should be no need to make a table


    SELECT format(ReadDT,"mm/dd/yyyy hh:nn"), avg(Irradiance) as avgIrradiance, avg(WindSpeed) as avgWindSpeed, avg(AirTemp) as avgAirTemp
    FROM myTable
    GROUP BY format(ReadDT,"mm/dd/yyyy hh:nn")

  3. #3
    JGtz is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jan 2016
    Posts
    2

    Thumbs up

    Quote Originally Posted by Ajax View Post
    leaving aside that Date is a reserved word and using it can cause issues (so I will give it the name ReadDT) sql along the following lines should work. There should be no need to make a table
    PERFECT! Thanks a bunch. That worked perfectly in my query.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 12-10-2015, 07:25 AM
  2. Replies: 10
    Last Post: 10-19-2015, 06:15 PM
  3. Replies: 1
    Last Post: 12-20-2013, 06:21 PM
  4. Replies: 5
    Last Post: 05-17-2013, 01:07 AM
  5. Replies: 1
    Last Post: 02-22-2012, 04:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums