Query - Display only total amount higher than the average...

goody444

New Member
Joined
Nov 22, 2004
Messages
4
I am creating a query that I would like to have list all of the total amounts that are higher than the average of the list. I can do this by simply averaging all of the totals and then writing ">(amount of average)" into the criteria box, however I would like Access to calculate the average for me. How would I write the criteria for this?

Example:

1) 200
2) 300
4) 100
5) 200
6) 50
7) 150

Average: 143
Therefore only 1, 2, 5, and 7 would be displayed.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Try something like this (my table name is tbl041122 and my field name is FIELD1) -- in the criteria line of your field, put (replacing my names with yours):

>(SELECT Avg(FIELD1) FROM tbl041122)
 
Upvote 0
Re: Query - Display only total amount higher than the averag

I tried your suggested criteria input, however I'm unsure of what my table name will be. I have created the totals field by creating a custom formula for the field (using sum(x,x,x)). How would I relate the criteria to this specific table? Sorry if this is hard to understand, I am a beginner at Access. Thanks for any help!
 
Upvote 0
Re: Query - Display only total amount higher than the averag

Can you paste the SQL from your query (the one w/o trying to show only those above the average)? When in query design view, go to View-SQL.
-rh
 
Upvote 0

Forum statistics

Threads
1,221,831
Messages
6,162,242
Members
451,756
Latest member
tommyw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top