Sum in Query

M

MichaelR39

I have a query which calculates the total profit costs from other
table/queries by Case Reference. This takes the cost value by code and
multiplies it with the number of units by case reference.

The profit costs are shown in 4 different columns named. DEBT, HOUSING,
WELFARE & PF EACH CONTAINING COSTS by Case reference.

I have tried adding these fields together but for some reason i just get a
blank column no figures are showing.

Any Suggestions?
 
A

Allen Browne

If any one of these fields is null (blank), the result of summing them will
be null.

Try an expression like this in your query (all on one line):
IIf([DEBT] Is Null, 0, [DEBT) +
IIf([HOUSING] Is Null, 0, [HOUSING]) +
IIf([...
 

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