In Explore, you display your data in customizable reports, or queries. Your Zendesk Explore pre-built dashboards already contain some pre-built queries for you; however, you might want to change how these queries represent your data or create new, custom queries.
Use this article to learn about creating queries and how to prepare your Zendesk data. If you want to learn more about how to modify pre-built queries, see Getting started modifying queries.
This getting started article contains the following topics:
What are queries?
Queries are questions you ask about the information stored in Zendesk. For example you could ask "What percentage of this month's tickets have been urgent?" or "What agents have the slowest full resolution time?".
You create queries in the Query Builder. If you want to learn more about navigating the Query Builder, see Getting started with the Explore interface.
Queries are stored in the Queries library. You can open the Queries library anytime by clicking the () icon on the left sidebar.
Creating your own queries
If you want to create your own queries, you need to define the data source containing the business information you want to report about. Explore uses datasets that connect you to information about Zendesk products like Talk, and Support.
Typically, you will simply connect to one of the existing datasets for the product you want to query. More advanced users might create new datasets for testing and customization purposes.
You must select a dataset before you can create a query. When you create a query, you will be prompted to choose the dataset you want.
For more detailed information, and to see the currently available datasets, see Choosing and creating datasets.
To create a new query
- From the Queries library, click the New query button.
- From the list of datasets, choose the one you want, then click Select.
Query Builder opens showing a new, blank query.
See Creating queries for more information.
This section gives you the basics you need to start building queries. You'll then learn about some of the ways in which you can customize queries to suit your own business needs.
Adding metrics and attributes
A typical query contains the following:
- Metrics: Quantifiable data, or things you measure like number of tickets, or number of replies.
- Attributes: Qualitative data like dates, groups, and tags. These 'slice' the results from your metric by the values in the attribute.
For example the attribute Assignee Name would list your different Zendesk Support assignee names as the values. If your query includes the #Tickets metric and the Assignee Name attribute, Explore displays the number of tickets for each assignee.
- Columns renders your results in one chart. The Columns box is located above your visualization. See Adding attributes to Columns.
- Rows renders your results into individual charts for each of your attribute values. You can navigate through the individual charts. The Rows box is located underneath Metrics. See Adding attributes to Rows.
- Explosions renders your results into multiple charts, each representing a different value for the added attributes. Charts are shown side-by-side in one query. The Explosions box is located underneath Rows. See Adding attributes to Explosions.
- Filters restricts which results are shown without the attribute appearing on your query. The Filters box is located at the bottom of the Query Builder. See Adding attributes to Filters.
A query must contain at least one metric. You can add metrics in different sizes, colors, on a dual axis, to a trend line, or include them in datatips. You can calculate your metrics' results in different ways, such as summation (SUM) or count (COUNT). You can see what calculation is currently applied by looking at the aggregator in front of the metric name. Explore will automatically apply a default aggregator, but you can select a new one. See Changing metric aggregators.
For more information on adding metrics and attributes, see Adding metrics and attributes to your query.
Selecting a visualization
Visualizations help you display your data in the format you want. Once you add metrics and attributes to your query, Explore automatically renders your query in the most suitable format. You can change the chart type in the Visualization type menu on the right sidebar. If you have selected a different visualization, the Visualization type menu icon will change from it's default look () to represent the chart type you chose.
For details, see Visualization types reference.
Saving your query
When you finish building your query, click Save. For more information about saving queries, see Saving your query.
After you add your data, you can begin to customize your query to suit your business needs. In Query Builder, you can find the available customization options on the right sidebar . There are three menus containing customization options.
In addition visualizations, you can also customize your query using the chart configuration menu (), on the right sidebar. It contains all your primary customization options, such as chart color, text formatting, and additional options unique to each type of visualization. For information about the options available in the Chart configuration menu, see Customizing your query
Example customization: Change a chart's color
In this example, you'll change the color of a chart. Experiment with the other options to see the difference it makes to your chart.
- Click the Chart configuration menu icon () on the right sidebar.
- Select the Colors option.
- Under Automatic color, click the color swatch in front of the metric name or click Apply predefined palette. The predefined palettes contains Explore's suggested color groups.
- Select a color, then click Select.
- Click the Chart configuration menu icon again to close the menu.
Your query will be updated with the new color. Make sure to save your query before navigating away from the Query Builder (see Saving your query).
For more details, see Customizing queries.
Performing calculations and creating custom metrics and attributes
Explore features many tools that can perform calculations on your data to analyze results such as the total, percentage, or future values. Explore makes calculations easy for you through result manipulations. In addition to result manipulations, you can also create completely new metrics and attributes using functions and pre-existing formulas with Explore's Calculation engine.
About result manipulations
Result manipulations enable you to apply calculations like totals, percentage difference, and more. You can also use result manipulations to hide, sort, restrict, and predict future results. Unlike Explore's calculated metrics and attributes, you do not need to write any formulas.
Result manipulations are located in the Result manipulation menu (). The result manipulation menu is the third menu on the right sidebar (see Result manipulations reference). When you click the Result manipulation menu icon (), you will see several calculation options you can apply to your report.
Result manipulations are applied after your metrics and attributes are processed in the query, and they will appear on the Filters bar above Filters. If you add several result manipulations, the order you apply the result manipulations might affect the outcome of your result. See Setting the order for your result manipulations for more information.
For information on the different types of result manipulations and how to add them, see Result manipulation reference.
About custom metrics and attributes
In Explore, you can create custom metrics and attributes or calculated metrics and calculated attributes to apply more detailed and advanced calculations to your results. Using calculated metrics and attributes, you can create new, custom metrics and attributes to add to your dataset. You can use calculated metrics and attributes to create unchanging metric results, rename attribute values, create completely custom new metrics and attributes, and more.
Calculated metrics and attributes are located in the Calculations menu ().
For a list of the available calculated metrics and attributes and how to add them, see Calculated metric and attribute reference.
Like your normal metrics and attributes, you will need to add calculated metrics and attributes to your query by selecting them from the one of the metric or attribute locations (see Adding metrics and attributes). When you add a calculated metric or attribute to your query first, it will filter your results before they are processed. Calculated metrics and attributes can help speed up loading time for large datasets by filtering results before they are processed.
Most calculated metrics and attributes provide you with pre-built templates for creating calculated metrics and attributes, but if you would like to create completely custom metrics or attributes based on your own entered functions, you will need to use Explore's formula writing language. The next topic in this section will discuss writing formulas, or you can see Formula writing resources.
For more information on calculations and custom elements in Explore, see Calculation types reference.