Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula change

Status
Not open for further replies.

psperry2

Programmer
Nov 7, 2007
141
US
I have this formula in a report footer:

=Sum([Elapsed_Days])/Count([Elapsed_Days])

What I need to change is to get the count function to not count when the Elapsed Days value is zero. I want the Average to not be wrong because of bad data.

I was thinking that some kind of a SQL stmt would be better but I am having a mental block trying to get it started.

 
This didn't work:

=Sum([Elapsed_Days])/Count([Elapsed_Days]>0)
 
Solved the problem, I made sure that if the Elapsed Days was going to be invalid, I set it to NULL and then the Count Function won't count it.

Give me a star please!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top