Results 1 to 7 of 7
  1. #1
    mejia.j88 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Location
    california
    Posts
    228

    Question Problem with two averages in report

    Hi all,

    I have a report in which I am calculating two averages. there is a field under the detail header called [resistivity], the report is grouped by days, and there are at most 4 entries per day. One of the averages is a daily average; for that i simply put a text box with =avg([resistivity]), call it daily average, and put it under the date footer; the works fine.



    the other average should be an average of the daily averages.
    the report is viewed by date range, so the amount of days selected could vary.

    i am not sure how to make my report show the average of these daily averages based on the date range selected.

    help please?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Do you want to provide project for analsis? Follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    mejia.j88 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Location
    california
    Posts
    228

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    You did not attach the db, just the shortcut from desktop.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    mejia.j88 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Location
    california
    Posts
    228
    DI_Water_Resistivity_forAutomatic_Junction_Etch_Rinse.zip

    sorry about that.

    thanks for taking a look at it.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Why are you saving date/time values to text instead of date type field?

    Also, you use Date as an alias field name. Date is a reserved word (it is a function) and should not be used as name. I changed to DateLog.

    The report has code referencing tbl_revisions not provided with the db so get error message. I deleted the code so report would run without error.

    Try:
    1. build query qry_report_average
    SELECT qry_report.DateLog, Avg(qry_report.Resistivity) AS AvgOfResistivity
    FROM qry_report
    GROUP BY qry_report.DateLog;

    2. build subform in report footer using the above query OR use DAvg in textbox in footer: =DAvg("AvgOfResistivity","qry_report_average")
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    mejia.j88 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Location
    california
    Posts
    228
    Hi June,

    I must have sent the first draft of the db, regardless, your advice has helped me with that little problem.
    i double checked the revised version of the db to make sure i didnt use any "date"/"time" names and changed the date value to date/time.
    the DAvg in textbox in footer worked great; thanks

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

Similar Threads

  1. Query to show averages by month
    By DDEB in forum Queries
    Replies: 3
    Last Post: 05-08-2012, 05:11 PM
  2. average of averages?
    By mejia.j88 in forum Reports
    Replies: 5
    Last Post: 01-24-2012, 08:09 AM
  3. averages in a report?
    By mejia.j88 in forum Reports
    Replies: 3
    Last Post: 01-18-2012, 06:12 PM
  4. Averages
    By Nixx1401 in forum Queries
    Replies: 1
    Last Post: 05-26-2011, 10:08 AM
  5. Query showing averages for groups
    By AnthonyTesta in forum Queries
    Replies: 1
    Last Post: 02-03-2010, 09:04 PM

Tags for this Thread

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