In this Explore recipe, you'll learn how to create a report with a stepped trend line. You can manually set the trend line to show your goals with an increasing value over months.
This recipe contains the following sections:
What you'll need
Skill level: Intermediate
Time required: 15 mins
- Zendesk Explore Professional or Enterprise
- Editor or Admin permissions (see Giving users access to Explore)
- SLA data in Zendesk Support
Creating the SWITCH metric
In this example, you need to create a SWITCH metric and then put in the values for each month.
- In Explore, click the reports () icon.
- In the Reports library, click New report.
- On the Select a dataset page, select Support > Support - SLAs, then click Start report. The report builder opens.
- In the Calculations menu (), click Standard calculated metric.
- In the Name field, enter a name for your metric. This example uses Stepped line.
- Under Functions, click Add, select the SWITCH function, and click +.
- Enter your monthly goals. In this example, an increasing value is set for each month from April to June.
SWITCH ([SLA update - Month]) { CASE "April": 5 CASE "May": 6 CASE "June": 7 DEFAULT: 0 }
- Click Save.
Adding the SWITCH metric to the report
Now that you created the stepped line metric, you can use it in any of your reports that use the Support: SLAs dataset.
To use the SWITCH metric in a report
- In Explore, create or edit a report using the Support: SLAs dataset.
- In the Metrics panel, click Add.
- From the list of metrics, choose Calculated metrics > Stepped line, then click Apply.
- Add a second metric to compare against the stepped trend line. For example, add the Achieved SLA targets, then click Apply.
- In the Columns panel, click Add.
- From the list of attributes, choose SLA update - Year and SLA update - Month. Explore displays the number of SLA targets that were met in each month against the stepped line that you set as your goal.
Next steps
To display the stepped trend line as a column, click the AVG(Stepped line) metric from the Metrics panel and select Dual. You can show or hide the values of the stepped line from the trend line page of the chart configuration menu ().