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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sum with exclusion condition

Status
Not open for further replies.

rmduser

Technical User
Feb 19, 2001
5
CA
I am using CR7 MR1.

I want to create a formula to sum a field but exclude values where another field meets a certain condition.

It would look like:
sum {pay_detl.total} where {pay_detl.location}<>MSMIS

I know that there is no "where" function in CR (unlike SQL) so I'd appreciate your advice. I'm a rookie at CR despite the age of our version so I would appreciate instructions with that in mind.
 
you can use a running total ...where you can give the where conditon in formula..
 
Or you could add it to your record selection if you don't want to see it at all.

and {pay_detl.location}<> "MSMIS"


 
Create a formula like this:

if {pay_detl.location} <> "MSMIS" then
{pay_detl.total}

Right click on this formula (placed in the detail section) and insert a sum on it.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top