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

Calculating Response Compliance Percentage 4

Status
Not open for further replies.

KalebsDad78

Technical User
May 6, 2006
57
US
Good Morning all,

I am trying to calculate my ambulance service response compliance percentage using Crystal XI w/ an ODBC Database. I already have a report created showing response times (which is a formula and showing an average response for each city/county in the Group Footer).

I'm not real sure though how to write a formula to tell me what percentage of calls in each city/county were under 8 minutes & 59 seconds versus the overall total amount of calls for the group.

I have included a screenshot of what I have so far if that helps you.

Thank you in advance for your help.
 
Did you set up the group on your formula {@Cdate} to print on change of Month?

-LB
 
I don't think so if I understand the question. I'm still learning the Crystal lingo but this is what my cdate formula looks like:

cdate({Trips.tdate})

 
You said you created a group to separate the calls by month. If you inserted a group on your formula:

cdate({Trips.tdate})

...there is an option for the date interval, and you should have selected "print on change of month" to organize it by month. Then my formula should have worked correctly, as you have to indicate the interval when grouping on dates, on less you are grouping by the default "daily" interval.

-LB
 
No, you're right LB...I did select within the group formula to print on change of month originally but that is the error I continue to receive.
 
Please show me your formula that is erroring out.

-LB
 
sum({@SecsShortResponse},{Trips.tdate},"@Cdate")% count({Trips.RunNumber},{Trips.tdate},"@Cdate")

and I also just used "Monthly" in place of the @Cdate formula and continued to get the same error.
 
If your group is on {@cdate} then that belongs in the second position, and the interval in the third:

sum({@SecsShortResponse},{@Cdate},"Monthly")% count({Trips.RunNumber},{@Cdate},"Monthly")

-LB
 
Hello all...I'm back.

I've got my reports created using the formula's above but I've added some additional cities into the report and when I refreshed, I get the "Division by Zero" error on some of the pages.

Here is the formula I'm using:

//@Life Emergency Short call percent
if sum({@Life_Emergency_Flag_short_Response},{@Cdate},"Monthly")
%
sum({@Life_Emergency_Flag},{@Cdate},"Monthly")<>0 then 0
else
sum({@Life_Emergency_Flag_short_Response},{@Cdate},"Monthly")
%
sum({@Life_Emergency_Flag},{@Cdate},"Monthly")

and it's highlighting from the first "sum" down to the closed bracket before the "less than" sign.

I've tried numerous suggestions in the other posts here with no luck.

Can I get some help with this please?

Thank you very much!
 
You need to check whether the denominator is 0. So your formula should be:

if sum({@Life_Emergency_Flag},{@Cdate},"Monthly") <> 0 then
sum({@Life_Emergency_Flag_short_Response},{@Cdate},"Monthly") % sum({@Life_Emergency_Flag},{@Cdate},"Monthly")

-LB
 
Your Crystal knowledge is scary amazing. Thank you for such a quick response.

As usual, you solved my problem that I've been staring at for two days. I knew it would be something simple like that...relatively speaking :).

Thanks again...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top