IF, then sum

LadyDiss

Registered User.
Local time
Today, 13:55
Joined
Aug 29, 2001
Messages
31
Can this be done? I have a report with names, if they attended a seminar and sales totals. I need to show all names, but only need to total sales for those who attended the seminar. I tried using Iif[seminar]="yes", sum([total sales]) but am not having any luck. Any ideas?
 
Do you have some sort of flag to show if they attended the seminar? If you do and if it's a yes/no field, you can only show the one's that have been checked in you query behind the report. If it's not a yes/no field you can still do the same in your query to show only yeses!
 
It is a yes/no field, but I need to show all fields and only the sum for the Yes. Make sense?
 
Try this at your footer of your report:

=Sum(IIf([Seminar]= "Yes",1,0))

This will count the yeses!
 
Thanks for your post, however I don't want to count the "yes", I want to total the sales for the "yes" individuals.
 
Tired fingers Rich :) ?

=Sum(IIf([Seminar]= Yes,[MyField],0))
 

Users who are viewing this thread

Back
Top Bottom