Totaling a field based on True/False from another field

Nymandus

Registered User.
Local time
Today, 07:37
Joined
May 9, 2013
Messages
30
My database is for service coupons that can be presented for multiple reasons and can have multiple coupons awarded on one.

so it looks like
CouponNumber
CouponDate
Approved (true/false)
Associate
PimssHelp (true/false)
CustomerAdvocate (true/false)
CustomerCompliment (true/false)
CouponsAwarded (number field for mutiples, default is 1)

I've tried my query with sums and without sums but am not having luck in my report

Two problems I am running into:
1) If I sum my querry it is grouping coupons awarded on the same date (should not happen often but it is possible)

2) I am trying to total a field [CouponsAwarded] based on all [PimssHelp] coupons marked as True
so If I have 5 PimssHelp coupons and 3 of them have 2 CouponsAwarded and the other 2 have the default 1 awarded, how do I get my report to show PimssHelp = 8?

the logic escapes me I want to say:
Sum couponsAwarded if PimssHelp=true

but =Sum([CouponsAwarded](IIf([PimssHelp],1,0)) does not work :banghead:

Any thoughts would be helpful
 
More like

=Sum(IIf(FieldName = True, AmountField, 0))
 
Exactly!!!
thank you...:)
 

Users who are viewing this thread

Back
Top Bottom