Sum one Fields Value if Another Field Equals a certain value?

Sum one Fields Value if Another Field Equals a certain value?

Post by david.isaa » Sun, 18 Jun 2006 00:13:42


I have a table of requests and each one record has a dollar values
assocated with it (Field [cost]). I want to be able to run a report
which gives me the Approved totals, Obligated values, & pending values
based on its current action.

Actions: Approved, Pending, Obligated


So for instance if Field Action equals "Approved" then sum(abs([cost])
and so on. Each reocrds has a cost and each record has a action.

I cannot seem to get anything to work.

Any help?

David
 
 
 

Sum one Fields Value if Another Field Equals a certain value?

Post by Duane Hook » Sun, 18 Jun 2006 01:07:44

Try
=Sum( Abs([Action] = "Approved") * [Cost])
--
Duane Hookom
MS Access MVP