In Explore, you can display your data in customizable reports or queries. Explore offers pre-built dashboards with many common reports; you may need these queries to suit your needs or create your own queries.
Use this article to learn how to create your own Explore queries. If you want to learn more about modifying queries in predefined dashboards, see Introduction to Modifying Query.
Note: Only members with Administrator and Editor roles can create or edit queries.
This article contains the following topics:
What are queries?
Creating your own queries
query creation
Query customization
Performing calculations and creating custom metrics and attributes
Explore pre-built queries
next steps
What are queries?
Queries are questions you ask about information stored in your Zendesk account. Examples of questions include “What is the percentage of urgent priority tickets for the month?” or “Which agents resolved the most tickets for the month?”.
You can create queries in Query Builder. If you'd like to learn more about navigating the Query Builder, see Introduction to the Explore interface.
Queries are stored in the query library. You can open the query library at any time by clicking the () icon in the left sidebar.
Creating your own queries
If you want to create a query, you need to define the data source that contains the business information you want to see in the report. Explore uses datasets that connect you to information about Zendesk products like Talk and Support. Just connect to one of the existing datasets for the product you want to query. Advanced users can create new datasets for testing and customization purposes.
You must select a dataset to be able to create a query. Once the query is created, you must choose the desired dataset. For detailed information and to see currently available datasets, see Working with datasets.
How to create a new query
In the query library, click New Query.
In the list of datasets, choose the desired one and click New Query.
The Query Builder opens with a new, empty query.
See Creating queries for more information and discover other ways to create queries.
query creation
This section provides basic information on creating queries. You'll learn a few ways to customize queries that best suit your business needs.
This section contains the following topics:
Inclusion of metrics and attributes
Chart type selection
query saving
Inclusion of metrics and attributes
A query typically contains the following items:
Metrics: Quantitative data or items that you measure, such as the number of tickets or the number of responses.
Attributes: Qualitative data such as dates, groups, and tags. They “separate” your metric results by the values in the attribute.
For example, the Assignee Name attribute lists the names of different Zendesk Support assignees as values. If your query includes the metric Number of tickets and the attribute Assignee name, you will see the number of tickets for each assignee.
In the Query Builder, metrics are added to the Metrics panel (see Including metrics). Attributes can be added to the Columns, Rows, Details and Filters panels (see Including attributes). The four attribute locations will render your graph as described below:
Columns renders your results in a chart. See Adding Attributes to Columns.
Rows renders your results in individual tables or graphs for each attribute value using a row picker. See Adding Attributes to Lines.
Breakdowns renders your results in multiple graphs, each representing a different value of the added attributes. Graphs are shown side by side in a query. See Adding Attributes to Drillthroughs.
Filters restricts the displayed results, without the attribute appearing in your query. See Adding Attributes to Filters.
The query must contain at least one metric. You can add metrics of different sizes or colors, on a dual axis or trendline, or include them in data descriptions. You can calculate the results of your metrics in different ways, such as by sum (SUM) or count (COUNT). You can find out which 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 view
The views are used to display your data in the format you want. After 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.
For details, see Visualization Types Reference.
query saving
Once your query has been created, click on Save. For more information on saving queries, see Saving the query.
Important: queries are not automatically saved. If you exit your query without saving it, all changes will be lost.
Query customization
Once you've added the data, you can start customizing the query to best suit your business needs. In Query Builder, there are customization options in the right sidebar. There are three menus that contain customization options.
In addition to visualizations, you can also customize your query using the chart configuration menu () in the right sidebar. It contains all your primary customization options such as chart color, text formatting, and other options unique to each visualization type. For information about the options available in the Graph Setup menu, see Query Customization.
Customization example: How to change chart color
In this example, you will change the color of the chart. Try using the other options to see the difference color makes to your chart.
How to change the color of a chart
Click on the Graph Setup menu icon () in the right sidebar.
Select the option Colors.
Under Auto color, click the color picker in front of the metric name, or click Apply a predefined palette. The predefined palettes contain the color groups suggested by Explore.
Select a color and click Select.
Click the Chart Setup menu icon again to close the menu.
Your query will be updated with the new color. Remember to save your query before exiting the Query Builder (see Saving your query).
For more details, see Customizing queries.
Performing calculations and creating custom metrics and attributes
Explore has several tools that allow you to perform calculations using your data to analyze results such as total, percentage or future values. Explore facilitates calculations through result manipulation. In addition to result manipulation, you can also create completely new metrics and attributes using pre-existing functions and formulas with Explore's Calculation Engine.
This section contains the following topics:
About result manipulation
About custom metrics and attributes
About result manipulation
The result manipulations allow the application of calculations such as totals, percentage difference, among others. You can also use result manipulation to hide, sort, restrict, and predict future results. Unlike Explore's calculated metrics and attributes, you don't need to write formulas.
Result manipulations are located in the Result manipulation() menu. The Result Handling menu is the third on the right sidebar (see Result Handling Reference). When you click on the Result Handling menu icon (), you will see several calculation options that you can use in your report.
Result manipulations are applied after metrics and attributes are processed in the query and will appear in the Filters bar above Filters. If you add multiple result manipulations, the order in which you apply the result manipulations can affect your result. See Defining the order of result manipulations for more information.
For information about the different types of result manipulations and how to add them, see Calculation Types Reference.
About custom metrics and attributes
Sometimes the predefined metrics and attributes provided with Explore may be insufficient for your needs. In that case, you can create your custom attributes and metrics or calculated metrics and calculated attributes to get the results you need. You can use calculated metrics and attributes to create unchanging metric results (such as an hourly cost), rename attribute values, create completely new metrics and attributes, and more.
Metrics and calculated attributes are located in the Calculations () menu.
For a list of available metrics and calculated attributes and information on how to add them, see Metrics and Calculated Attributes Reference.
As with your normal metrics and attributes, you will need to add the metrics and attributes to your query.
Selecting a view
The views are used to display your data in the format you want. After 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.
For details, see Visualization Types Reference.
query saving
Once your query has been created, click on Save. For more information on saving queries, see Saving the query.
Important: queries are not automatically saved. If you exit your query without saving it, all changes will be lost.
Query customization
Once you've added the data, you can start customizing the query to best suit your business needs. In Query Builder, there are customization options in the right sidebar. There are three menus that contain customization options.
In addition to visualizations, you can also customize your query using the chart configuration menu () in the right sidebar. It contains all your primary customization options such as chart color, text formatting, and other options unique to each visualization type. For information about the options available in the Graph Setup menu, see Query Customization.
Customization example: How to change chart color
In this example, you will change the color of the chart. Try using the other options to see the difference color makes to your chart.
How to change the color of a chart
Click on the Graph Setup menu icon () in the right sidebar.
Select the option Colors.
Under Auto color, click the color picker in front of the metric name, or click Apply a predefined palette. The predefined palettes contain the color groups suggested by Explore.
Select a color and click Select.
Click the Chart Setup menu icon again to close the menu.
Your query will be updated with the new color. Remember to save your query before exiting the Query Builder (see Saving your query).
For more details, see Customizing queries.
Performing calculations and creating custom metrics and attributes
Explore has several tools that allow you to perform calculations using your data to analyze results such as total, percentage or future values. Explore facilitates calculations through result manipulation. In addition to result manipulation, you can also create completely new metrics and attributes using pre-existing functions and formulas with Explore's Calculation Engine.
This section contains the following topics:
About result manipulation
About custom metrics and attributes
About result manipulation
The result manipulations allow the application of calculations such as totals, percentage difference, among others. You can also use result manipulation to hide, sort, restrict, and predict future results. Unlike Explore's calculated metrics and attributes, you don't need to write formulas.
Result manipulations are located in the Result manipulation() menu. The Result Handling menu is the third on the right sidebar (see Result Handling Reference). When you click on the Result Handling menu icon (), you will see several calculation options that you can use in your report.
Result manipulations are applied after metrics and attributes are processed in the query and will appear in the Filters bar above Filters. If you add multiple result manipulations, the order in which you apply the result manipulations can affect your result. See Defining the order of result manipulations for more information.
For information about the different types of result manipulations and how to add them, see Calculation Types Reference.
About custom metrics and attributes
Sometimes the predefined metrics and attributes provided with Explore may be insufficient for your needs. In that case, you can create your custom attributes and metrics or calculated metrics and calculated attributes to get the results you need. You can use calculated metrics and attributes to create unchanging metric results (such as an hourly cost), rename attribute values, create completely new metrics and attributes, and more.
Metrics and calculated attributes are located in the Calculations () menu.
For a list of available metrics and calculated attributes and information on how to add them, see Metrics and Calculated Attributes Reference.
As with your normal metrics and attributes, you will need to add the metrics
Comments
0 comments
Please sign in to leave a comment.