=sum(iif(....

RaptureReady

Registered User.
Local time
Yesterday, 18:36
Joined
May 7, 2007
Messages
30
Hey all, I looked through some of the forums, but could not find a direct answer.

What I am trying to do is sum a field if it contains certain values contained in that field.

Like I have a field called [Service], in that field are mutilple values, such as "Good", "Bad", "Excellent", etc.

I have been trying this, but it doesn't work.

=sum(iif([Service]="Good", "Bad", "Excellent"))

Can anyone help here?

Thanks,
RR
 
Try

=sum(iif([Service]="Good", 1, 0))
 
You might try: CountService: Sum(IIf([Service] In ("Good", "Bad", "Excellent"),1,0)) - this is in a query.
 

Users who are viewing this thread

Back
Top Bottom