Need help w/ expression

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

I need some help w/ the expression below:

Average: Round(Sum([Score]/[Counter]),1)

Currently, the query pulls the following records:

Sum Counter Average
200 2 100
0 3
590 7 84.3
200 4 50


The 2nd record (0, 3) does not give me the expected value of "0" for the
Average column.

How can I modify the "Average" expression to show the zero value?


Thanks,
Tom
 
Should it be?
Average:Round(Sum([Score])/[Counter], 1)

Is the zero really a zero or are there Null values? If the latter,
Average:Round(Nz(Sum([Score]), 0)/[Counter], 1)
 
Wayne:

Thanks, that did the trick!!!

And, yes, you're right... they were NULLs...

Again, thanks,
Tom



Wayne Morgan said:
Should it be?
Average:Round(Sum([Score])/[Counter], 1)

Is the zero really a zero or are there Null values? If the latter,
Average:Round(Nz(Sum([Score]), 0)/[Counter], 1)

--
Wayne Morgan
MS Access MVP


Tom said:
I need some help w/ the expression below:

Average: Round(Sum([Score]/[Counter]),1)

Currently, the query pulls the following records:

Sum Counter Average
200 2 100
0 3
590 7 84.3
200 4 50


The 2nd record (0, 3) does not give me the expected value of "0" for the
Average column.

How can I modify the "Average" expression to show the zero value?


Thanks,
Tom
 
Back
Top