424,476 Members | 1,529 Online
Need help? Post your question and get tips & solutions from a community of 424,476 IT Pros & Developers. It's quick & easy.

How to count average based on criteria?

P: 34
I have 3 tables and 1 query, please see image below.
So i want to build a report that show information about average score by student city:

Total Average = Avg([score])
Total Average Texas City only = ????
Total Average Washington City only = ?????

Attached Images
 average.jpg (36.9 KB, 793 views)
Oct 1 '12 #1
4 Replies

 Expert Mod 10K+ P: 12,315 You can use the DAvg function for the city breakdown if there's not too many. Otherwise. I would just do it as a subquery with a record source that returns the average by city. Oct 1 '12 #2

 P: 34 sorry,can you write that function like Expand|Select|Wrap|Line Numbers =DAvg([score]..........?? because am too newbie for programming :( Oct 1 '12 #3

 Expert Mod 5K+ P: 5,287 yosiro, Google the DAvg() function or press [F1] for the context help in Access. Also, what have you tried? I see a homework question without any effort made to solve the question. We can help solve specfic errors and climb tall mountains; however, you have to get the rope up the side of the mountain just a little bit. Oct 1 '12 #4

 P: 34 After some experiment i am succeed find that formula, thanks master zmbd Expand|Select|Wrap|Line Numbers Epr = DAvg("[score]","Query_Student","[city]='Texas'")  Oct 1 '12 #5