In many time-based reports, Explore uses the 24-hour clock format and you can't change this. Using a simple report, this recipe shows you a way you can change how times (and other things) are displayed using renamed sets.
This article contains the following sections:
What you'll need
Skill level: Medium
Time required: 20 minutes
- Zendesk Explore Professional or Enterprise
- Editor or Admin permissions (see Giving agents access to Explore)
- Ticket data in Zendesk Support
- Some experience creating reports with Explore
How to create the initial report
This report displays the number of tickets created at each hour of the day. If you need more help to create the report, see Creating reports.
- In Explore, create a new report using the Support: Tickets dataset.
- Add the metric Tickets to the Metrics panel
- Add the attribute Ticket created - Hour to the Columns panel.
Explore generates a chart that looks similar to this:
Notice how the time on the X axis is listed in 24-hour format. In the next procedure, you'll learn how to change this so that the time reads as 12-hour format. For example, 15 will read as 3pm.
How to use a renamed set to change the time format
In this procedure, you'll create a custom attribute that renames the times from the Ticket Created - Hour attribute to be in a 12-hour.
- With the report you created open, open the calculations menu ().
- Under Attributes, click Renamed set.
- On the Rename values page, enter a name for your custom attribute, for example Ticket created - 12 Hour.
- From the Computed from drop-down list, choose the attribute you want to rename values for, in this case Ticket created - Hour.
- You'll now see a list of all stored values for the attribute. In the text box next to each value, type the value you want to display in the chart instead of the current value.
Tip: In your list, you might notice that some hour values are missing. This is because your report did not pick any results up for that hour, therefore it has no value. If data is generated later for the missing hour, you can come back and edit this attribute.
- When you are finished, click Save. You now have a custom attribute containing a renamed set. Add the custom attribute to the Columns panel in place of the Ticket created - Hour attribute.
This gets you half way. However, Explore now treats the renamed values as text strings, and sorts them as such. If you try to use this attribute, you'll see something like this:
To fix this, you'll need to create another new attribute that contains an ordered set generated from your renamed set.
To create the ordered set
- With the report you created open, open the calculations menu ().
- Under Attributes, click Ordered set.
- On the Custom order page, enter a name for the new attribute. This will be the attribute you use to create the final report, so give it a descriptive name like Tickets Created - 12 Hour Ordered.
- From the Computed from drop-down list, select the attribute containing the renamed set you created previously, Tickets Created - 12 Hour.
- You'll see a list of the possible values for the attribute. Drag and drop these into the correct time order.
- When you are finished, click Save.
Now, you can replace the column attribute you previously used with your new attribute, Tickets Created - 12 Hour Ordered and your chart will now display correctly with the correct time legend.
Next steps
You can find more information about renamed sets in Organizing values by groups and sets.