Sum with a null value

J

John Smith

My query contains 100 items plus the sales number of five different
customers. Not everyone customer has sales for each item. I am trying to
total the sales of all five customers but only get a sum if each customer
has a sales value. Can I still get a sum if a customer has a null value?

Any help is appreciated. Thanks
 
K

Keith Wilby

John Smith said:
My query contains 100 items plus the sales number of five different
customers. Not everyone customer has sales for each item. I am trying to
total the sales of all five customers but only get a sum if each customer
has a sales value. Can I still get a sum if a customer has a null value?

Any help is appreciated. Thanks

You could use the Nz (null to value) function to convert nulls to zeros.

Keith.
www.keithwilby.co.uk
 
J

Jeff Boyce

"How" depends on "what", as in "what data/table structure are you using".

Please describe your table structure and post the SQL statement of your
query.

(... and as described else-thread, look into the Nz() function...)

Regards

Jeff Boyce
Microsoft Access MVP
 

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