×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Sum with multiple criteria

Sum with multiple criteria

Sum with multiple criteria

(OP)
I have a report where I am summing the count of a field based on another fields criteria. I cam currently using the following successful:

CODE

=Sum(IIf([released_by]="NAME" ,[countoftrans_NO],0)) 

This works fine, but I need to add additional criteria to the "released_by". I have tried "Name" and "other" and also tried "Name" or "other" and it does not seem to show the desired results. How can I modify this so that I can count the "countoftrans_no" by multiple criteria of "released_by"?

Any help is appreciated.

Thank you,

Paul

RE: Sum with multiple criteria

Hi,

How about this?

CODE

=Sum(IIf([released_by]="NAME" Or [released_by]="other" ,[countoftrans_NO],0)) 

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein

RE: Sum with multiple criteria

I would probably use the IN() condition.


CODE --> ControlSource

=Sum(Abs([released_by] In ("NAME","other"))*[countoftrans_NO]) 

Ideally there should be some value in the released_by lookup table that identifies whether or not a value should be included in the Sum().

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close