- You want to display results only between certain dates
- You want to restrict results to a certain group
- You want to make a large query more manageable by restricting the results
- Filter by metrics: All of the metrics added to the Metrics panel are affected by the filter you add. For example, you can filter the Tickets metric to show only tickets that were created last week.
- Filter by individual attributes: Only the attributes you've set a filter for are affected by the filter you add. For example, you can include only the names of your team members in a query result.
This article contains the following sections:
Example: Filtering by metrics
In this example, you'll add a count of all tickets and a count of all solved tickets to a query. You'll then filter the results to show only tickets created last week.
To create and filter the query
- Open a new, blank query using the Support: Tickets dataset. For help, see Creating queries.
- In the Metrics panel, click Add.
- From the list of metrics, choose the following two metrics:
- Tickets > Tickets
- Tickets > Solved tickets
- When you are finished, click Apply. Explore displays the total number of tickets and the total number of solved tickets in your Support instance.
- Next, add a filter to restrict the results to only show tickets created last week. In the Filters panel, click Add.
- From the list of filters, you can choose any attribute to add as a filter. For example, you could choose Ticket > Ticket channel to restrict the results to only a specific ticket channel or Assignee > Assignee name to show only tickets assigned to specific people. In this case, you want to show only tickets created last week. From the list of filters, choose Time - Ticket created > Ticket created - Date.
- When you are finished, click Apply. You'll notice that the query results haven't changed. This is because you need to configure the filter to display only the values you want.
- In the Filters panel, click the Ticket created - Date filter you just added.
- The filter page opens. By default, you'll see a list of all possible values listed. You can check or uncheck the values you want to include in the query results.
Tip: Only the first 100 values are shown in the list. To show more values, click the arrow next to the Apply button.
In this case however, you want to select a date range, in this case "last week". Click Edit date ranges.
- On the Date range page, you can configure simple date ranges like Today and Yesterday and more advanced date ranges like 20 days in the past. For this example, choose Last week, then click Apply.
The query results update to show only tickets and solved tickets created last week.
You could now add attributes to slice these filtered metrics by anything you want like assignee name, ticket status, and more.
Example: Filtering by attributes
In this example, you'll create a query that displays the assignee name and ticket status for all tickets in your Support instance. You'll then filter this to show only tickets assigned to you.
To create the query
- Open a new, blank query using the Support: Tickets dataset. For help, see Creating queries.
- In the Metrics panel, click Add.
- From the list of metrics, choose Tickets > Tickets, then click Apply. Explore displays the number of tickets in your Support instance.
- In the Rows panel, click Add.
- From the list of attributes, choose the following two attributes:
- Assignee > Assignee name
- Tickets > Ticket status
- When you are finished, click Apply. Explore displays a table showing each assignee name and the number of tickets they have in each ticket status.
- Next, you'll filter on the Assignee name attribute to include only yourself in the results. In the Rows panel, click the Assignee name attribute.
- On the Assignee name page, select the checkbox next to your name. If the list of names is long, you can type the first few characters to narrow down the list. You can add multiple names if you want. When you are finished, click Apply.
Explore displays only tickets assigned to you and the number of tickets in each status.
Other filter types
Another type of filter, the metric filter enables you to set a minimum or maximum value for your results. For more information, see Selecting the metric result range.
You can also apply filters to your dashboards. When you do this, dashboard viewers can directly control the filters to modify the report. For more information, see the following two articles:
0 Comments
Please sign in to leave a comment.