Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sum if field equals 3 1

Status
Not open for further replies.

jchewsmith

Technical User
Nov 20, 2006
161
US
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
 
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
 
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
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top