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

Ratio calculation from multiple records

Status
Not open for further replies.

chris35

Technical User
Apr 21, 2003
24
US
Hope someone can help. I am using CR 8.0. I work in a hospital and need to calculate a ratio between two different lab test results. I have a result for XBUN and for XCRE and need to calculate the XBUN/XCRE ratio. the problem is this, for each patient sample, there are two detail records displayed, one for each test. For the result, I have a formula using the "val" function that strips any string values from the result and only displays the number. I see this:

pt. data XBUN XCRE ratio
XXXXXX 25 0.00
0.00 0.2

the ratio is blank becuase it will not divide by zero. How can I have the ratio calculated across two records?

Thanks!!
 
You could total xbun and xcre for each patient, and then calculate the ratio at the end of the patient records.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top