Report Sum/If Statement

K

kfraser

I have a report that I am writing that will be summing footer sections with
twist. I want to have the sum function state "0" if the days outstanding is
greater than 2. However, if the days outstanding is less than or equal to 2
I want the report to sum the count.

The formula that I am using is:
=IIf([WU Day Count]>2,0,Sum([CountOfENTRY_NUM1]))

This is working great if there is only a single line to add on either side
(>2 or <=2) or if there are no instances of records >2 days, however if there
are multiple lines where the days outstanding could be a number of days
(including the record where the days outstanding is >2), it is adding all of
the days .

Can you please help me??

Ultimately, I want to compare all values to the sum (count of records <2 days)
and report a percentage.
 
J

John Spencer

Perhaps what you want is

=SUM(IIF([WU Day Count]>2,0,[CountofEntryNum1]))

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 

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