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

Average

Status
Not open for further replies.

jalenben1

Programmer
Jul 22, 2008
154
US
I have a Crystal Report that have a series of MTTR's

0:16
0:06
0:03
0:05
0:23

How do I calculate the average in Crystal Report?
 
MTTRs? WHat does that mean? What do your fields represent? hours and minutes?

-LB
 
MTTR in Response is the Mean time to Response to a ticket. I already have it formmatted to show me the time I need to see (hours:mins). I am looking to first add the total then compute the average. The field name I have is Huawei Dashboard.MTTR Response Time
 
Is the field itself a number expressed only in minutes?

-LB
 
Yes the following times, which are formatted, are expressed in minutes.
 
Yes the following times, which are formatted, are expressed in minutes:

0:16
0:06
0:03
0:05
0:23

I want to get the total then the average
 
I was asking about the datatype of the field. If it is a number representing minutes, you should insert a summary on the field at the report and/or group levels, and then format the result as a string representing hours and minutes.

-LB
 
I did that in Access. I converted the Access table with the formatted field and used that as a table in Crystal Reports. I have my desired results as far as the hours:mins. I just need to know how to total up the hours:mins and get the average in Crystal Report. I tried to do a formula but was not successful.
 
The average needs to be calculated based on a number, not a string, as you currently have it. So you need to convert the hours/minutes back into minutes and then insert the average, and then convert back into the string format. Or go back into Access and pick up the original number field to do the calculation.

Can you confirm that your field in Crystal is a String and not a time?

-LB
 
Try converting it back to minutes by using:

(hour({table.time})*60)+minute({table.time})

Then insert an average on this and then convert back to the time format.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top