Ask Search:
Richard AndrewRichard Andrew 

Plotting time values in a line chart

I would like to plot the time values of a datetime field in a report with a line chart to show the most popular times of day when a phone call is logged.

I have grouped the time field value, but there's too many variables to make the chart usable. Is there any way I can plot the values so that rather than grouping time values that match exactly, they are grouped by hour (for example)?

Here's my report chart at the moment.

User-added image
Best Answer chosen by Richard Andrew
Marc WilsonMarc Wilson
You will need to create a custom formula field on the object to store your hour data. The formula (number) field should be: HOUR(TIMEVALUE(Insert.Your.Field.Label.Here))

This will return a number corresponding to the hour. For instance, a time value of 10:30 would return "10," the time 15:45 would return "15," etc.

Alternatively, you could design a formula (text) field using the IF function which labels calls from 12a - 6a as "early morning," calls from 6a - 9a as "mid-morning," etc.

You then design a report based on that field. But if you're going to do a chart, make it a bar chart, which is much better for comparing the number of values in columns. Line charts are for displaying how values change over time, but in this instance you are not interested in the shift in call volume from 10a to 11a, rather you want to know which time period had more total calls.

All Answers

Marc WilsonMarc Wilson
You will need to create a custom formula field on the object to store your hour data. The formula (number) field should be: HOUR(TIMEVALUE(Insert.Your.Field.Label.Here))

This will return a number corresponding to the hour. For instance, a time value of 10:30 would return "10," the time 15:45 would return "15," etc.

Alternatively, you could design a formula (text) field using the IF function which labels calls from 12a - 6a as "early morning," calls from 6a - 9a as "mid-morning," etc.

You then design a report based on that field. But if you're going to do a chart, make it a bar chart, which is much better for comparing the number of values in columns. Line charts are for displaying how values change over time, but in this instance you are not interested in the shift in call volume from 10a to 11a, rather you want to know which time period had more total calls.
This was selected as the best answer
Richard AndrewRichard Andrew
Yup, that's done it. Thanks a lot for this.