473,508 Members | 2,360 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to count average based on criteria?

yosiro
34 New Member
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 = ?????

Please help me

Attached Images
File Type: jpg average.jpg (36.9 KB, 1046 views)
Oct 1 '12 #1
4 3086
Rabbit
12,516 Recognized Expert Moderator MVP
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
yosiro
34 New Member
sorry,can you write that function like
Expand|Select|Wrap|Line Numbers
  1. =DAvg([score]..........??
because am too newbie for programming :(
Oct 1 '12 #3
zmbd
5,501 Recognized Expert Moderator Expert
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
yosiro
34 New Member
After some experiment i am succeed find that formula, thanks master zmbd

Expand|Select|Wrap|Line Numbers
  1. Epr = DAvg("[score]","Query_Student","[city]='Texas'") 
Oct 1 '12 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

9
22082
by: dan | last post by:
this is a program to count average letters per word. i am able to count the total number of letters, but not words. How do you count the total number of words in a text file, so i am able to divide...
5
44318
by: Mike Bannon | last post by:
Hi All We have an order processing database which includes the standard Order Header/Order Lines tables. I'm trying to write a query to get the average number of lines per order over a given...
3
1413
by: C White | last post by:
got another one for you guys out there, and thanks again for the help with my "counting question" this time i'm looking to select records based on date, the database stores the date as...
1
4490
by: Rado | last post by:
Hi All, This might quite simple process for some but I am finding it really difficult to do. What is required is not a standard Duplicate query but a variation on it. For example I have...
22
12425
by: MP | last post by:
vb6,ado,mdb,win2k i pass the sql string to the .Execute method on the open connection to Table_Name(const) db table fwiw (the connection opened via class wrapper:) msConnString = "Data Source="...
1
4321
by: loki419 | last post by:
I have a simple select query that produces results similar to this LOCATION FUNCTION 001 1111 001 1111 100 1111 100 ...
1
2190
by: Starke | last post by:
I have a table where Im counting records that have a two certain criteria. My Question is, If one criteria is met, but the other isnt instead of not retrieving the record can the count value...
2
1334
by: thankamani | last post by:
HI all Am a newbie in C. I am trying to calculate the average of some numbers (floating point) from a file : the file format is as follows 0 3.312000 3.312000 3.312000 1 3.362000 ...
1
8216
by: Ormazd | last post by:
Hello, I was wondering if anyone might be able to help me with a little PERL script? I'm very new and I have been given a task to write a simple Perl script that prints out the file names and...
10
13605
by: yappy77 | last post by:
I have a database where all companies must meet 3 requirements in order to be in compliance. I need to know out of the total number of companies that are not in compliance how many do not meet...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7115
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7321
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7377
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7036
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5047
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.