Link to home
Start Free TrialLog in
Avatar of pdvsa
pdvsaFlag for United States of America

asked on

Sum with where criteria on a report

I need to sum with a where criteria.
I have the following but its wrong

=Sum([USD Equiv Rpmt] & [PaymentMadeYN]= "Yes")

The part after the & is not correct.  The YN field is a value list with row source "yes";"no"

Thank you
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

have you tried
=dsum("[USD Equiv Rpmt]","tableName","[PaymentMadeYN]= 'Yes'")
ASKER CERTIFIED SOLUTION
Avatar of PatHartman
PatHartman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It could be:

=Sum([USD Equiv Rpmt] * Abs([PaymentMadeYN] = "Yes"))

Open in new window

/gustav
Avatar of pdvsa

ASKER

Hi Pat, that worked.  Thank you.

Dsum was summing, i believe, more records than what i needed, while SUM limited it to only the report.  Was a good lesson for me.

Thank you for the help.
<Dsum was summing, i believe, more records than what i needed, while SUM limited it to only the report>

you should have changed "tableName" with the record source of your report which I believe is a query.