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!

Looking for advice to divide time by procedure count 1

Status
Not open for further replies.

mvalley

Technical User
Mar 4, 2011
80
US
I am trying to place the average time for a procedure on a Crystal report by using a formula.

I need to take the field total minutes divided by total cases performed. I tried the below formula ({proc_surg_dur.ps_total_minutes}/{proc_surg_dur.ps_performed}) but get the error message when I place it in the report “Division by Zero” How is the best way for me to obtain my objective?
 

if {proc_surg_dur.ps_performed} = 0 then 0

else

({proc_surg_dur.ps_total_minutes}/{proc_surg_dur.ps_performed})


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top