Link to home
Start Free TrialLog in
Avatar of SteveL13
SteveL13Flag for United States of America

asked on

How sum values in query designer using certain criteria

I'm trying to sum values in query designer using certain criteria.  Here is what I have so far but isn't working:

Account: [Balance] where [Type]="Football Account"


I have several other fields to capture in the query which is why I need to do it this way.
Avatar of bfuchs
bfuchs
Flag of United States of America image

are all fields using same criteria where [Type]="Football Account"?
if yes, then just have select sum(balance) from...group by...
if not, then you must use a iif() function, like iif([Type]="Football Account,[Balance),0), then do a sum of that calculated field.
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
@Steve,
did you tested my suggestion?
Avatar of SteveL13

ASKER

I didn't know how to work with your suggestion.  Pat's suggestion worked out for me.
Pat's suggestion worked out for me.
what?! can you please explain how did that helped...