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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exclusion of one record for Averages.

Status
Not open for further replies.

m3gd04

Technical User
Sep 17, 2004
17
US
I work in a hospital and we're trying to find the average turnover time between cases in each of our Surgery rooms however we need to exclude the first record for obviously this would be N/A. I'm hoping this is something pretty easy to solve:


I have the following fields in a table:

Case Date Case # Room Start Room Stop Time bet cases

07/01/04 001 8:22 10:05 0.00
07/01/04 002 10:49 13:09 44.00
07/01/04 003 13:45 15:17 36.00

avg: 26.66 min


The "Time bet Cases" variable has the written formula:
=If <Case Date>= Previous (<Case Date>) Then <Room Start Time Value>-Previous(<Room Stop Time Value>) Else 0

Again, my question is: How can I exclude the first record so that the average is from the 2nd line down. In other words the record should reflect 40 minutes rather than 26.6 if we exclude the value of "0" from the first line item record.

Any help would be greatly appreciated...

Thanks



 
You can't use a simple average. You have to build the calculation yourself as:
sum(<Time bet Cases>)/(Count(<Case #)-1)

Steve Krandel
VERITAS Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top