Grand total and Average

G

Guest

Hello,

I have created a report, based on a query with totals for fields such as
rent, utilities, sales. I created calculated field on the query that will
determine the number of months remaining on the lease (this is a lease
management database).

I've added to the report footer the grand totals and averages for rent,
utilities, sales, etc. The problem I have is with the number of months
remaining on the lease. There are several that contain negative numbers
which of course skews the grand total and averages of that field. How can I
exclude the negative numbers, or make them 0 in the calculation?

Thanks in advance.
 
K

Ken Snell \(MVP\)

Use an expression similar to this for the "number of months remaining"
calculated field:

NumMonthsRemain: IIf(Expr<0,0,Expr)

where Expr is the expression that you're using now to calculate the number
of months remaining.
 
G

Guest

Thank you Ken, that worked perfectly!

Ken Snell (MVP) said:
Use an expression similar to this for the "number of months remaining"
calculated field:

NumMonthsRemain: IIf(Expr<0,0,Expr)

where Expr is the expression that you're using now to calculate the number
of months remaining.
 

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