×
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!
  • Students Click Here

*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

Jobs

Sum if field equals 3

Sum if field equals 3

Sum if field equals 3

(OP)
I have a max field that the results should be between 1 and 4. I want to sum this field in column 1 if the results = 1, sum in column 2 if the results = 2, sum in column 3 if the results = 3 and sum in column 4 if the results = 4.

column 1 column 2 column 3 column 4
3 5 2 8

RE: Sum if field equals 3

This isn’t very clear. If you are saying you want to do separate sums based on the value of a field “max”, then you could insert a crosstab and use {table.max} as your column field, and sum of quantity as your summary field.

If this isn’t what you mean, please explain in more detail.

-LB

RE: Sum if field equals 3

(OP)
Yes I want to use the same max field column to place a sum if in separate columns. so when the max field = 1 I want to sum all records into a column called max field = 1, then if the max field = 2 then I want to sum all records where the max field = 2 into a column called max field =2 and so on.

A cross tab won't work because I have other columns on the report that I want to display.

Thanks

JS

RE: Sum if field equals 3

You can make individual formulas for each column like this:

If {table.max}=1 then {table.number}

Add one to the detail section for each column and then insert sums at the group and/or report level.

-LB

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