Sum not to include given records

G

Guest

How can I show a total in my report footer that does not include given
records in the sum? My report has several regions and their leads recieved
in the detail section. In the detail section (and group sections) I want to
show the leads recieved for all regions including the "out of area" region;
however, I do not want the "out of area" leads included in the total at the
end of the report (in the report footer). I hope all that makes sense.

Thanks in advance

Boone
 
T

ThePandaManCan

Booner,

One possible solution would be to selectively query the items
which you want. IE - your total query would be separate from your
display query, in that while your display query does not filter out the
out of area region, you could filter the "out of area" region out in a
secondary query and use the sum function on its result.

Hope that helps,

-ThePandaMan
 
J

John Spencer

=Abs(Sum(TheFieldtoSum * (Region <> "out of area")))
or
=Sum(IIF(Region<>"Out of Area",TheFieldToSum,0))
 
G

Guest

Thanks John,

Works just like the sumif in excel. What is the difference between an if
and an immediate if?
 

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