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

Average Response time

Status
Not open for further replies.

olushow

MIS
Jul 26, 2006
84
US


What is the proper way to average the response time between a submit date and a resolved date.. Assuming the following

Submit Date - 01/12/11 08:30AM
and

Resolved Date - 01/13/11 - 4:15pm

Assuming response time = Last Resolved Date - Submit Date

How will I average this out in Crystal Reports.?
 
datediff("s",{table.submitdate},{table.resoveddate})

Insert an average on this. If you want to convert it to a string format that displays hours and minutes and seconds, use faq767-3543 to convert the average (not the datediff).

-LB
 
@LB thanks for your response , once again.

But how do I input my average into the formula o convert the average to to display hours ,and minutes and seconds.?

I created one formula to do the date diff (Time To Resolve:

(datediff("s",{HPD_Help_Desk.Submit_Date}, {HPD_Help_Desk.Last_Resolved_Date}))

I created another formula to average out the Datediff -

Average({@Time To Resolve})

From this point, what do I do.. Or how do I implement my average into the formula for displaying time in Hours, Minutes, and Seconds.?

 
I tried the following formula

whileprintingrecords;
numberVar dur:= {@AverageOfTimeToResolve}; //gets the average time in seconds.
numberVar hrs;
numberVar min;
numberVar sec;
stringVar hhmmss;

hhmmss := totext(hrs,"00")+":"+totext(min,"00")+":"+totext(sec,"00");

hhmmss

but it comes back with all zeros
 
I got it figured out now. Was missing some parts in the formula.
 
Is there something I need to change in the following formula to prevent it from showing the same average time for every record?


Shoould I create a group based on the the following formula?


whileprintingrecords;
numberVar dur:= {@AverageOfTimeToResolve}; //gets the average time in seconds.
numberVar days;
numberVar hrs;
numberVar min;
numberVar sec;
stringVar ddhhmmss;
days:= Truncate(Truncate(dur/60)/60)/24;
hrs := Truncate(Truncate(dur/60)/60);
min := Remainder(Truncate(dur/60),60);
sec := Remainder(dur,60);

ddhhmmss := totext(days,0,"") + ":" + totext(hrs,"00") + ":" + totext(min,"00") + ":" + totext(sec,"00");

ddhhmmss

 
By record, do you mean for some group? Add the group condition to your average:

numberVar dur:= Average({@Time To Resolve},{table.groupfield});

The stringformula should be placed in the corresponding group section.

-LB
 
Ok.. I think get the idea...

However now the customer wants me to do a percentage of Resolved Cases.

Although report is pulling all cases regardless..

I created the following formula

If {HPD_Help_Desk.Status} in ["Resolved", "Closed"]
Then 1

Then I tried to do a summary based on this formula, and show it as a percentage of the total cases..

it keeps coming back with totals for all the cases, Can the totals and percentages be done manually.. What is the proper sequence?
 
This is a new question and calls for a new thread.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top