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

Calculating a "mean" (average) Operating Room start time

Status
Not open for further replies.

Jonathan212

IS-IT--Management
Oct 22, 2002
57
US
Each day I have about 15 "patient in operating room" start times for first cases of the day.

How do I create a formula or string in Crystal so that I can summarize (show the mean) of the average patient in operating room time for those 15 cases. I can do some manipulations in Excel to do this, but is there a way in Crystal for me to do it ?
 
If the "Patient in Operating Room, First Case of the Day Start Times" are in one field and other start times are not (ex. 2nd and 3rd case of the day) then bring the field into Crystal, right click on it, select Insert then Summary. This will bring up a summary box. Change the top choice to Average. This will create a group and bring the average into the group footer. You can suppress the Detail section if you want to see only the averages.

Hillary
 
Selections with repsect to "Patient in Operating Room Time" when I do a summary are: Max, Min, Count, distinct count, Nth Largest, Mode, Nth most frequent". If there was a selection for "average" it would be wonderful. I can't find that selection. Time is being represented as "8:07" for example.
 
If this time is something like:

"12:15"

what sort of average are you expecting?

That's why I had suggested that you post some sample data and expected output.

The Business knowledge you're sharing is useful, but sample data and desired output will get you help more efficiently.

-k kai@informeddatadecisions.com
 
This probably isn't the smoothest way to do this but it works!

First, I looked in Crystal help and it says you cannot average time. So you will have to convert time to a number, average the number and convert back to time.

The first formula is
//Formula1
//Convert Start time into a number
Hour ({START_TIME})*60+Minute({START_TIME})

Place this formula in your report. Now when you right click, Insert, Summary, an Average choice will be there. Select Average.

The second formula is
//Formula2
//Convert Average Start number back to time
TimeValue(Average ({@Formula1}, {Group Name}))

When I did this on my system it automatically converted for times after 12:00pm. For example 1:00am converted to 60 and 1:00pm converted to 780 after Formula1. Make sure this works the same on yours.

Good luck!

Hillary
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top