CCIDBMNG
Registered User.
- Local time
- Today, 04:44
- Joined
- Jan 25, 2002
- Messages
- 154
I'm running a complex query and I'm trying to get an average of a field for a 2 week period. The only problem is sometimes there will be zeros and I receive an error because of the division by zero. I don't know how to get around this. The calculation is Sum([Pledge Amount]*[2WSum])/Sum([2wsum]). I've tried using IIf([2wSum]=0,0,Sum([Pledge Amount]*[2WSum])/Sum([2wsum])) but I receive the error you tried to evaluate a query that does not include the specified expression as part of an aggregate function. Does anyone know a way around this?