Using "IF" to do a SUM

M

MikeC

The built-in Dsum function should work:

=DSum("Nz([QuantitySum], 0)","YourTable","[Bonus] = " &
False)
 
M

Marshall Barton

MikeC said:
The built-in Dsum function should work:

=DSum("Nz([QuantitySum], 0)","YourTable","[Bonus] = " &
False)
-----Original Message-----
In a report I need to add the quantity to a =SUM( only if the Bonus (a
logical -True or False field) is False. Something like this - If ([Bonus] =
False, =Sum([QuantitySum]). Does any one know the
correct syntax??


I can't see the original post so I'll jump in here.

This can be done with Sum :

=Sum(IIf(Bonus, 0, Quantity))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top