In this Explore recipe, you'll learn how to create a query that shows the week over week percentage change in meeting your SLA targets.
What you'll need
Skill level: Advanced
Time Required: 25 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 Explore, click the query (
) icon.
- In the Queries library, click New query.
- On the Choose a dataset page, click Support > SLAs > Support: SLAs, then click New query. Query builder opens.
- Now, create Date range calculated metrics to show the percentage of SLA targets that were met in each date range. From the Calculations (
) menu, click Date range calculated metric.
- Create a new date range calculated metric called SLA % achieved last week and set it up as follows:
- Original metric: % Achieved SLA targets
- Defined on: SLA update
- Date range: Simple - Last week
- Create a new date range calculated metric called SLA % achieved week before last and set it up as follows:
- Original metric: % Achieved SLA targets
- Defined on: SLA update
-
Date range: Advanced
- From the beginning of: 2 weeks in the past
- To the end of: 2 weeks in the past
- In the Metrics panel, click Add.
- From the list of metrics, choose Calculated metrics > SLA % achieved last week and Calculated metrics > SLA % achieved week before last, then click Apply.
- Ensure the metric aggregators for the custom metrics are set to SUM. For more information, see Choosing metric aggregators.
- From the Result manipulation (
) menu, click Result metric calculation.
- In the Result metric calculation menu, click Add a new metric.
- Add the metric below by clicking Insert to add the metrics to the formula.
(SUM(SLA % achieved last week)-SUM(SLA % achieved week before last))/SUM(SLA % achieved week before last)
- When you are finished, click + Add.
- From the Chart configuration (
) menu, click Display format.
- On the Display format page, set all metrics to display in %.
-
From the Visualization type (
) menu, click Table.
The query is complete. See the screenshot below for an example of how it will look.
4 Comments
This dataset doesn't seem to exist?
Hi CJ Johnson, I just confirmed that this is working for me. Here's an example of me choosing that dataset:

If you're not seeing what I'm seeing here, please let me know and I'll open a ticket on your behalf. Thanks!
I followed the instruction said above. But I am not getting any value in the last field.
Hi Vignesh Kannan
Could you provide a screenshot of the error you are using along with the calculated metric you are using? Let's check as to why it's no loading any data
Please sign in to leave a comment.