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!

Need to average a summed field

Status
Not open for further replies.

LisaRR

Technical User
May 2, 2003
31
US
I need to calculate the average of a summary field. I need to calculate the average # of days a patient is on a ventilator for each unit.

The report is grouped by Unit and Patient Account #.
# of ventilator days per patient is a summary field:

Patient Name On Vent Y/N
Patient A - Y
Patient A - Y
Patient A - Y
Summary - Count of vent days for patient A = 3

Patient B - Y
Patient B - Y
Summary - Count of vent days for patient B = 2

When I try to create a formula to average the count of vent days per patient, I get an error message that says "This Field Cannot Be Summarized"

I have tried counting the vent days per patient as both a summary and a running total but am still not able to average the results. Thanks to anyone who can give me some direction on this.
 
How did you calculate the count of vent days per patient? What is the content of the formula you used? You didn't show a date field or any instances where the value <> "Y".

-LB
 
In the Select Expert, I am qualifying "On A Vent YN" = Y. There will not be any data where the value <> "Y".

I am counting the field "On a Vent YN" to get the count of vent days per patient. In my example above, Patient A has 3 entries in the field representing 3 separate days, so the count of vent days = 3.

There is a date range selection on a field called "Calendar Date". This is the actual date that the patient is on a vent.



 
Create a formula like this in the field explorer->formulas->new:

count({table.on_a_vent_YN})/distinctcount({table.patientID})

Place this in the report footer (or report header).

-LB
 
Thanks - I was able to get that formula to work with a little tweaking to accommodate the groupings in the report. I think I was making it more complicated than it needed to be. I appreciate your fast assistance! Lisa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top