Selasa, 12 Maret 2013

[MS_AccessPros] Averaging multiple fields

 

Hi, would some of you please help me with this calculation:

I keep records of test grades for a group of students. Says there are 4 tests total. To calculate the average score for each student, I can easily add up the total 4 score and divide by 4.

However, some students only take 2 tests or 3 tests and I still want to calculate the average of either 2 or 3 tests that those student take.

For the 3-test takers, I need the sum to be divided by 3. For the 2-test takers, I need the sum to be divided by 2.

Is there a formula that I can put in the query to calculate this average? The problem I encounter is for those 2-test or 3-test takers, there is either 1 or 2 null fields, which messes up my calculation.

I had tried the (NZ(Field1)+NZ(Field2)+NZ(Field3) but that doesn't work.

Thanks in advance for your help!

Tim

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar