What you'll need
Skill level: Moderate
Time Required: 20 minutes
- Zendesk Explore Professional or Enterprise
- Editor or Admin permissions (see Giving agents access to Explore)
- Ticket data in Zendesk Support
Creating the query
To create the query
- In Zendesk Explore, click the query () icon.
- In the Queries library, click New query.
- On the Choose a dataset page, click Support > Tickets > Support: Tickets, then click New query. Query Builder opens.
- Now, create a Standard calculated metric to show the number of days before or after a due date that a ticket was solved. Click Calculations (), and then Standard calculated metric.
- On the Standard calculated metric page, copy the formula below and paste it into the metric editor. Add a title for the metric like Due Date Delivery. It will look like the screenshot below:
DATE_DIFF([Ticket solved - Timestamp],[Ticket due - Timestamp],"nb_of_days")
Tip: If you're working in a language other than English, read this article to help you enter Explore formulas in your language.
- In the Metrics panel, click Add.
- From the list of metrics, choose Calculated metrics > Due Date Delivery, then click Apply.
- Ensure the metric aggregator for Due Date Delivery is set to AVG. For more information, see Choosing metric aggregators.
- In the Rows panel, click Add.
- From the list of attributes, choose Ticket > Ticket group, then click Apply.
- Click Chart configuration (), then Display format. Change AVG(Due Date Delivery) to Advanced. Then copy the formatting below and replace the text in the Display format editor.
IF (AVG(Due Date Delivery) < 0) THEN
"thousandsSeparator": " "
ELIF (AVG(Due Date Delivery) > 1) THEN
This will change the color of the values based on whether your agents are solving a ticket ahead of the due date, or exceeding the due date.
The query is complete! See the screenshot below as an example.