In this recipe, you'll create a simple query that lists agents and the number of solved tickets for each. You'll then add the query to a dashboard and explore how dashboard filters can allow the report viewer to change the results of your query in the dashboard without changing the underlying query itself. This can be a powerful way to give report viewers the chance to configure reports just how they want. It can also save you the time creating multiple reports.
This article contains the following topics:
What you'll need
- Zendesk Explore Professional or Enterprise
- Editor or Admin permissions (see Giving agents access to Explore)
- Ticket and agent data in Zendesk Support
Creating the base query and dashboard
Before you start exploring filters, create your query using the instructions below. The query lists agents and the number of solved tickets for each
To create the query
- In Explore, click the queries (
) icon.
- In the Queries library, click New query.
- On the Choose a dataset page, click Support > Tickets > Support: Tickets [default].
- Click New query. Explore creates the new query and opens query builder.
- In the Metrics panel of query builder, click Add.
- From the list of metrics, choose Tickets > Solved Tickets, then click Apply.
- In the Rows panel, click Add.
- From the list of attributes, choose Assignee > Assignee name, then click Apply. Explore generates a table showing all of your agents, and the number of tickets they've solved.
Tip: If your organization has a lot of agents, consider applying a filter to the Assignee name attribute to select only the names you want returned.
- Give the query a name, for example "Agent solved tickets", then click Save > Add to dashboard.
- On the Save new query to page, choose a new dashboard, enter a name for the dashboard, for example "Dashboard filters test", then click Save. Explore creates a new dashboard named "Dashboard filters test" and adds the "Agents solved tickets" query to it.
Opening your dashboard
- In Explore, click the dashboards (
) icon.
- On the Dashboards page, choose the dashboard you just created, Dashboard filters test.
- The dashboard opens in preview mode containing the Agent solved tickets query you created. Click Edit to start making changes.
Adding a time filter
Use this filter when you want to enable report viewers to see solved tickets (or any other metric) for a date range they specify.
To add a time filter
- In the dashboard you just opened, click Add > Add time filter.
- On the Time filter widget page, choose the attribute you want to use when selecting a date range. You can only choose from time-based attributes. Choose Support: Tickets [default] - tickets_solved_at.
Tip: The attribute names are displayed as their internal Explore names. Zendesk plans to change these to friendly names in a future update.
- Scroll to the bottom of the Time filter widget page. From the Render as drop-down list, choose Calendar.
Tip: Feel free to experiment with the other date picker types in the Render as list. These give you options to let your viewers choose simple, or advanced date ranges.
- When you are finished, click Close. For more details about the options on this page, see Adding interactive dashboard widgets.
- Explore displays the time filter. You might need to drag it to another position on the dashboard if it's obscuring your query.
- In the left month of the time filter calendar, choose the start date for your report.
- In the right month of the time filter calendar, choose the end date for your report.
Explore recalculates the query and displays the number of tickets solved in the date range you specified.
If you want to delete the time filter before you move onto the next example, click the arrow on the filter and choose Delete. Don't delete the Agent solved tickets query.
Adding a data filter
You can enable report viewers to choose from a list the names of agents who they want to see solved tickets for.
To add a data filter
- In your dashboard, click Add > Add data filter.
- On the Choose data filter columns page, choose the attribute Assignee name because you want to give the report viewer the ability to filter the report based on the agent name. You can select multiple attributes to give the viewer more flexibility.
- When you are finished, click Close.
- Explore displays the data filter. From the Assignee name drop-down list, choose one or more names, then click Apply.
The query table updates to show only the names you selected.
Adding a metric filter
You can enable report viewers to filter the range of results shown. For example, don't show agents with less than 50 solved tickets.
To add a metric filter
- In your dashboard, click Add > Add metric filter.
- On the Choose metric filter page, choose the metric that you want to limit results for, in this case COUNT(Solved tickets), then click Apply.
Explore displays the Metric filter slider. You can drag the two circles left and right. Explore only displays query results that are between the two values you select.
Adding a change metric
In addition to being able to see the number of solved tickets for your agents, some report viewers might also want to see a different metric like the number of unsolved tickets. You can use a change metric to give them this option without changing the original query.
To add a change metric
- In your dashboard, click Add > Add change metric.
- On the Choose change metric page, choose the metric that you want to let viewers change, in this case COUNT(Solved tickets).
- In the Restrict to this list of metrics field, choose Unsolved tickets and Solved tickets (you add Solved tickets so that viewers can switch between the two metrics). You can select multiple metrics to give the viewer more flexibility.
- When you are finished, click Apply.
Explore displays the Change metrics widget. You can now use the COUNT(Solved tickets) to metrics drop-down list to change the query table to display the Unsolved tickets metric.
Adding a change attribute
You can give agents the option of displaying a different attribute than the assignee name, for example the number of tickets solved for each ticket channel. You can do this by using a change attribute.
To add a change attribute
- In your dashboard, click Add > Add change attribute.
- On the Choose change attribute page, choose the attribute that you want to let viewers change, in this case Assignee name.
- In the Restrict to this list of attributes field, choose Ticket channel and Assignee name (you add Assignee name so that viewers can switch between the two metrics). You can select multiple attributes to give the viewer more flexibility.
- When you are finished, click Apply.
Explore displays the Change attributes widget. You can now use the Assignee name to attributes drop-down list to change the query table to display the Ticket channel metric.
17 Comments
2 questions:
1) I created a data filter on a dashboard that filters on a custom org field that is populated with primary internal contacts for each org. I have several queries on a tab, but they are based on 2 different datasets. I cannot see a way to create one data filter that will allow me to filter all of the queries (from both datasets) down to a subset of the primary org contacts. The only thing that seems to work is creating two different (but identical looking) data filters on the tab - one filters one dataset, the other filters the other dataset, which is a clunky and non-intuitive for my dashboard users. Am I missing something?
By contrast, a Time filter allows me to select from both datasets for the same filter widget.
2) Same use case - the list of options in the data filter include internal contacts who are suspended/have left the company. I do not want their names to appear in the drop-down, however I cannot figure out a way to exclude them from the data filter the way that I can with a query.
Hi Ellen,
About your first question – I'm afraid it's currently not possible to have a dashboard data filter apply to queries under different datasets. A data filter must be from the same dataset as the report for it to apply on a query widget. I tried to explore other available options, but it looks like there really isn't a workaround. Sorry about this limitation, Ellen.
On your question about configuring the drop-down options for a data filter, you can create a custom Set attribute and select only the values that you need to show up in the drop-down list. Values that are not included in the custom Set will not be visible when you use the custom attribute as filter in a query/dashboard. You can read more about this from this article section: Creating Sets.
Thank you!
Thanks for the response Gab. I will just need to create two data filters, clunky but works.
On the second question - I will look into creating a set. However, another thing I notice is that deleted items appear in drop-downs too, which seems more like a bug. For ex: we have various deleted orgs and they also appear in the drop down, is that expected? These were orgs that were set up initially in our instance but were not needed, there are no tickets associated with them.
Hi Ellen,
For your second question, it's not a bug! Due to the way Explore pulls data from the API endpoints, specifically the incremental API. This keeps track of everything in your entire account, included deleted and nondeleted attributes. To get around this, as Gab recommended, create a set for your active organizations and then use that attribute to filter, rather than the default filter which pulls everything.
Sarah C
Customer Advocate
support@zendesk.com
Got a question? Ask our Zendesk Community
Hi Ellen,
Sorry, let me correct myself. On your question about having a data filter apply to queries from different datasets – apparently, there's an option to link a filter from one dataset to a similar one from another dataset.
Just edit the filter and you'll see this option from the menu. Select the corresponding attribute to link it to the other dataset, and this data filter will be used on queries from both datasets that are added to your dashboard. You can refer to this article section for more details: Link data filters.
I'm sorry for the confusion earlier. but I hope this helps. Thanks Ellen!
Hi Gab - a little non-intuitive, but that did work! Thanks for the update.
Is there a way to save filters?
I've created a dashboard and would like this to display only the tickets solved by a certain number of our agents. I can filter under data filters for assignee, role, and ticket group. But when I preview the dashboard, all agents show up again. Is there no way to save filters?
Hey Erika Kenney,
If you add a bookmark, after you change your filters to the state you prefer, then you may save it in that state. You may also make it the default state if you pin the bookmark:
Thank you, Melissa!
I appreciate your response and was able to add/pin a bookmark. Some feedback for the product: adding a bookmark isn't very intuitive and is a bit on the clunky side.
Happy to help, Erika Kenney!
I don't actually work at Zendesk, I work at a partner company which implements Zendesk. But I agree, bookmarks are not intuitive.
Is there a way to limit the number of options a user has to choose from in a dashboard filter? Assignee, for example, for me lists all users, including external possible users as options. This makes the list huge. I only want to include Support Engineers. Is this possible?
Hi fellownarrator one way I've used is to create a "set" attribute in Explore. In this example, I've created a set that just contains two names:
You can now use this as the attribute in your data filter and will only see those names.
I'm very interested to hear if anyone has a better way of doing it than that!
After you create the set, when you go to a Dashboard and try to add it, do you select data filter or something else? I don't see the Set listed, I do see Groups listed. Can you give screenshots please?
fellownarrator For the "My assignees" set I created above, I then added a data filter in the dashboard.
In the filters properties, My assignees was available to select:
I hope that helps.
Hello ,
Does anyone know if there is a way to have a query to which the dashboard filters won't apply? We would like to have one query to stay constant so we can compare it with the data in the rest of the queries where we apply filters.
Thank you
Hi Vladimir,
Absolutely. There is an option to exclude filters from queries on your dashboard which you can learn more about here: Best practices for using dashboard filters.
Hope this helps!
Ah that was so obvious.. lol
Thanks for the help, Taylor
Please sign in to leave a comment.