Although Explore features many visualizations to help you present your query results, sometimes a simple table is the best way to present information. Tables are a great way to compare data collected over a period of time, for example:
This table was created using the Zendesk tickets dataset, using two metrics, COUNT(Tickets) and SUM(Agent replies), the column Ticket created - Quarter, and the row Ticket type. If the query doesn't show a table, use the visualization selector () to change the chart format.
Creating a table is just the start. This article shows some of the many customization options that help you present your tables in the form you need.
This article contains the following topics:
Changing the look of your table
In the chart configuration menu (), the following areas contain customization options which are particularly useful when working with tables:
The chart menu helps you to customize the text style of your table. Additionally, further options can be accessed if your table has hyperlinks. For more information about using links in tables, see Working with links in tables.
Text style options include editing the size, color, and formatting for headers, results, totals, and subtotals. If you add totals or subtotals, you can change their labels and their repetition text.
Columns are added to your table every time you add an attribute or metric. You can control how columns appear under Chart configuration > Columns.
Adding metrics to rows
By default, metrics are placed in different columns. You can list the metrics together in one column by selecting Metrics on rows.
If you've selected Metrics on rows or added an attribute on Rows, you can select Show row number to display the number of rows in your table.
Setting column width
Columns are fitted to their content and aligned automatically, unless you change these options in Columns. To input a new width and alignment for individual columns, you must deselect Fit to content and Automatic alignment.
If you select a column width that removes a portion of your text, you can expand your text onto additional lines by checking Allow multiline. You can set the number of lines by typing a new number in Multi-line margin.
If your text exceeds the selected number of lines, you can check Discoverable multiline. Discoverable multiline lets you expand text by clicking a Read more link.
To use discoverable multiline, on the Chart page of the chart configuration menu(), change the Text interpretation setting to HTML.
In the column list, you can also select whether to show or hide columns and add an arrow to stress the direction of results. Hiding columns can be useful when you want to remove empty or unnecessary columns.
For example, in the report below the result path calculation calculates the percentage of difference based on the previous period. This causes the third column to become empty. In the image below, the column has been hidden.
You can hide columns by clicking the eye icon next to the column number.
You can customize the colors of your table in Colors. You can edit the background, header, rows, totals, subtotals, and table colors. You can choose your own colors or select from Explore's color palettes.
Sorting data in tables
You can sort the results of your table based on any of its metrics. To do this, click the heading at the top of any metrics column in the table.
You can also control the default sort order for tables in the Result manipulation () > Sorts menu.
To turn off the ability to sort, under Chart configuration > Columns, deselect Allow column sorting.
If you want to display totals at the bottom of the table, choose Result manipulation () > Totals, and then choose the setting you want.
Working with links in tables
If you're table contains links, for example to tickets from a ticket ID, more options appear in the chart configuration menu () to help you control how the links work:
Text interpretation: Choose from:
- Text only: Links are shows as text, and can't be clicked.
- Raw: Links are shown as text, but any embedded HTML text is also displayed.
- HTML: The link text is displayed. If it is contained in a valid HTML link, the link will be clickable.
If you chose HTML, the following additional options are displayed:
- Clickable URL: Enables report viewers to click the link and visit the associated URL.
- URL alias and Image URL alias: Enables you to enter text that will appear instead of the URL.
- Display image: If your URL points to an image, the image will automatically appear when a user hovers over the link. You can disable this by deselecting Display images.
For some great examples of using links in queries, see Explore recipe: Configuring clickable links to tickets.
Manipulating table results
Just like with charts, you can use result manipulations to change the data in your table. For example, you can apply a default sort order, add totals, restrict the range of results that are presented, and more.
For a full list of result manipulations, see Calculation type reference.