Skip to main content

Table and pivot table visualizations

You can use table and pivot table visualizations to present data in a structured format with customizable elements such as custom and conditional formatting, hyperlinks, and images. This page explains how to control data presentation in table and pivot table visualizations.

For examples of creating pivot visualizations, see Pivot visualization.

What's the difference between a table visualization and the results table?

A table visualization can be manipulated independently of the original results table that appears under the dataset. By default, table visualizations appear with all columns hidden. To show or hide columns, click the Eye icon eye icon next to the column name.

Visible and hidden columns in the visualization editor.

Reorder columns

With the table visualization widget selected, use the visualization editor to reorder table columns.

Customize column settings

Click a column name to open the column settings, then adjust any of the following options:

Setting

Description

Column display name

Overrides the default column name shown in the table.

Use for search

Makes the column searchable in table filters.

Description

Adds hover text that explains the column's meaning or business context.

Display as

Changes how the data is rendered, such as showing a number as currency or a timestamp as a date.

Default column width

Sets the initial width (in pixels) for the column when the table loads.

Allow HTML content

Enables HTML rendering inside cells, which is useful for badges, links, or inline images. To learn how to encode an image as a url, see Image paths and URLs.

Font conditions

Applies conditional font color formatting based on value thresholds.

Customize grid settings

Use the Grids tab to configure the following:

  • Resizable columns: Enable dashboard viewers to resize columns.
  • Items per page: Set the number of rows that appear on each page of the table.
  • Freeze first N columns: Specify the number of columns to keep in place while allowing horizontal scrolling for the rest of the table.

Customize common data types

Use the Display as drop-down menu to control the data type of the displayed value. Depending on the data type, various customization options are available. For example, you can:

  • Display floats out to three decimal places
  • Show only the month and year of a date column
  • Zero-pad integers
  • Prepend or append text to your number fields
  • Display values as Booleans

Text

The Allow HTML content field has the following behavior:

  • Enabled: HTML content is run through an HTML sanitizer and the column is rendered as HTML.
  • Disabled: The content is displayed without rendering the HTML.

Numeric and date-time

For reference information on formatting numeric and date and time data types, see:

Boolean values

To display cells as Boolean values, select Boolean from the Display as drop-down menu. You can customize the values that appear as false and true. You can also use the visualization editor to apply conditional formatting.

Customize special data types

Dashboard table visualizations also support the following special data types: image, JSON, and link. Use the Display as drop-down menu to control the data type of the displayed value.

Table visualization with Display as options shown. Link is selected.

To make HTML links from your dashboard clickable, select Link. If the value translates directly to a link, a clickable link appears in the table.

You can also set values for: URL template, Text template, Title template. These template fields control how an HTML link is rendered. The fields accept mustache-style parameters (double curly braces) for the column names in the table. The mustache parameters support the pipe filter urlEscape, which URL-escapes the value.

Image

If a field in your database contains links to images, select Image to display the images inline with your table results. To learn how to encode an image as a url, see Image paths and URLs.

JSON

If your data returns JSON formatted text, select JSON. This lets you collapse and expand elements in a clean format.

Conditional formatting with text functions

Table and pivot table visualizations support dynamic text functions for conditional formatting. You can use the following functions to apply formatting based on text patterns:

  • contains(): Applies formatting when a cell contains specific text.
  • startswith(): Applies formatting when a cell starts with specific text.
  • endswith(): Applies formatting when a cell ends with specific text.

To use these functions:

  1. Select a column in the table or pivot table visualization
  2. In the Font conditions section, define a rule using one of the text functions
  3. Specify the formatting (color, style) to apply when the condition is met

Example: To highlight all cells containing "Error", use contains("Error") in your font condition rule.

You can also conditionally set the text color by using font conditions to apply different colors based on cell values or text patterns.

Pivot table configuration

Pivot tables are a specialized type of table visualization that aggregate and summarize data. They support all the customization options available for standard tables, plus additional pivot-specific features described in this section.

note

Pivot tables support rendering up to 1000 columns x 1000 rows.

Sticky headers

Pivot table header values are sticky and remain visible on screen while scrolling through the table data. This makes it easier to understand the context of your data when viewing large pivot tables.

You can add hyperlinks to text in pivot table values and display them as clickable URLs:

  1. Select a value field in your pivot table visualization
  2. Open the Actions tab in the visualization editor
  3. Specify a URL path for the link

URL path options:

  • Relative path (default): Enter a path using {{@}} to represent the data value. For example: /sql/dashboardsv3/{{@}}. This path is automatically appended to your Databricks workspace URL, creating a link like https://<your-databricks-workspace>.com/<path>.

  • Fully qualified URL: Navigate to a different web domain by providing a complete HTTPS URL. For example: https://databricks.com/{{@}}.

The {{@}} placeholder is replaced with the actual cell value when the link is rendered, allowing dynamic URLs based on your data.