Group Footer Sum If Calc Controls

G

George Hammett

I have a detail section of info where I need to provide
two sum numbers; one to sum all positive values and one to
sum all negative values...simply done in excel as a sumif
statement but I can't figure out how to do it in
Access...report is filtered.

Thanks!
 
M

Marshall Barton

George said:
I have a detail section of info where I need to provide
two sum numbers; one to sum all positive values and one to
sum all negative values...simply done in excel as a sumif
statement but I can't figure out how to do it in
Access...report is filtered.

Use an expression Like:

=Sum(IIf(thefield >= 0, thefield, 0))

for the positives and a similar expression for the
negatives.

Not that whatever you use for "thefield" must be a field in
the report's record source table/query, not a control on the
report.
 

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