3 Replies Latest reply on May 15, 2009 1:58 PM by comment_1

# Average Calculation question

### Title

Average Calculation question

### Post

I have a database for calculating grades by quarter. I would like to have a calculation field average the quarters and a final exam score, but the icing on the cake would be if I could it average only if the fields contained a numeric value. For instance, if a teacher entered a numeric value for Quarter 1, Quarter 3 and Quarter 4 but left Quarter 2 blank, the average wouldn't be affected by the blank value for Quarter 2.

This is probably really simple, but I need a nudge in the right direction- Thanks!

• ###### 1. Re: Average Calculation question

Are these different fields in the same table? (That might not be your best possible table design)

If so, Sum (Quarter1, Quarter2, Quarter3, Quarter4) / Count(Quarter1, Quarter2, Quarter3, Quarter4)

For the count function to give the expected result, Unused fields must be blank, not zero.

• ###### 2. Re: Average Calculation question

Yes they are; I tried your solution and it works like a charm! Thank you so much!

• ###### 3. Re: Average Calculation question

Of course, you could also use:

Average ( Quarter1 ; Quarter2 ; Quarter3 ; Quarter4 )

but why do in one step what can be done in two?