Help needed to get accurate average in the report

G

Guest

I am trying to calculate the average of 2 English courses fields.

Seems simple except that not all applicants have values for these 2 grades
(Fields are 'Number' datatype).
Default grade for non-entries in either field is 0....so no Null values to
worry about.

Some applicants will have a grade for both fields: English_Grade and
English_Grade2.

Some will have a grade in the 1st field: English_Grade but a 0 in the 2nd
field English_Grade2 (just meaning they only did 1 course)

Some will have a 0 in the 1st field English_Grade...and a grade in the 2nd
field: English_Grade2 (also only means they did 1 course)

Others may have 2 0's...never did either course.

When calculating the average of the grades...I need to take all
possibilities into account...
So, for example...if English_Grade = 80 and English_Grade2 = 0....I want the
average for that applicant to equal 80....not divided by 2 to get 40....etc...

This report is just a list of all applicant names...and their english
prerequisite average.

How can I set up the query in an IIf statement to do all this...?
Do not want to use a VB function....

Thanks!
 
G

Guest

Think I figured a way out....thanks to anyone who took the time to read.

EngGrade:
((IIf((Nz([English_Grade],0)=0),[English_Grade2],[English_Grade]))+(IIf((Nz([English_Grade2],0)=0),[English_Grade],[English_Grade2])))/2
 

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