Average within Query

  • Thread starter pushrodengine via AccessMonster.com
  • Start date
P

pushrodengine via AccessMonster.com

Is there a way to average the values of field within a query?

I have a query that determines the total minutes a task takes to complete,
this field is label “Minutesâ€. I would like to average the “Minutes†not
including the blank records, and the display the average minutes in a report.

Thanks
 
M

Michel Walsh

SELECT AVG(minutes)
FROM tableNameHere


in SQL view, or, in query design view, bring the table (in the top half
part), click on the summation button on the toolbar to get the extra line
"total" in the grid, drag the field minutes in the grid, change GROUP BY to
AVG.



If you don't want a query, you can also use

DAvg("minutes", "tableNameHere" )

to have the average of all the records of the table.



Untested, but in a section of a report, you can also try

=Avg("minutes")


to average the minutes of all the records of the actual 'report's group'
(It works with Sum, have never tried with Avg ! )






Hoping it may help,
Vanderghast, Access MVP



pushrodengine via AccessMonster.com said:
I'm not sure how to used the Average function in this case.


KARL said:
A totals query has Average as one of the selection options.
Is there a way to average the values of field within a query?
[quoted text clipped - 3 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top