Data tables represent data in a tabular view, similar to a spreadsheet. Data tables split your data into categories, with each categorization field represented in the table columns. The unique categories are represented as the table rows, and Charts displays aggregated values in the table body based on the fields selected.
Data tables use the following encoding channels:
The category encoding channels. Charts creates a row in the table for each unique value in this field. When multiple Groups are added to the chart, Charts creates a row for each unique combination of group fields.
The Groups encoding channel supports binning for numeric and date fields.
The aggregation encoding channels. Charts creates a column for each field mapped into the Values channel. Charts aggregates the encoded Values fields using the selected aggregation methods and populates the grid cells with the aggregated value for the corresponding Group.
A second Category encoding channel. When you use Dynamic Columns, Charts creates table columns based on the unique values retrieved from the field mapped into the Dynamic Columns channel. Charts uses the field mapped into the Values channel to populate the grid cells, aggregated against both the Group and Dynamic Column categories.
You cannot apply dynamic columns to a table if you have selected multiple Value encoding channels.
For an example of how to use dynamic columns, see the following example.
The Dynamic Columns encoding channel supports binning for numeric and date fields.
Data tables have a wide variety of applications, but are most useful when comparing multiple categories of calculated values. Visual charts struggle to display multiple categories of data without losing their audience. Data tables present data with multiple categories such that you can see which value applies to which slice of data.
Data tables are also useful for showing precise data values, rather than comparing approximate values. Comparing approximate values is best done with a visual representation, instead of text.
You can use data tables to show:
The total cost to rent an apartment, including rent, cleaning fees, and security deposits organized by location and total area of the unit.
Time spent working out and total calories burned during various exercises categorized by the type of exercise and time of day the exercised was performed.
The following customization options are specific to data table charts. To see all available customization options, see Customize Charts.
You can wrap text that does fit in a single data cell across multiple lines. This setting is off by default. To turn it on:
Select the Customize tab of the Chart Builder.
Expand the Fields section.
Select your desired field from the dropdown menu.
Toggle the Wrap Text switch to enable this feature.
You can pin Group and Row Total columns to the side of the data table. A pinned column remains fixed in place while the rest of the table scrolls.
To pin a column, hover over the column you want to pin and click the button in the column header. The button toggles on and the column pins to the side of the data table:
A Group column pins to the left of any unpinned columns.
The Row Total column pins to the right of any unpinned columns.
To unpin a column, click the button in the header of the column you want to unpin. The button toggles off and if the column is a Group column, it moves to the right of any pinned Group columns.
You can create styling rules for table cell values that match conditions you define. Conditional formatting rules affect the look of your chart dynamically: if the value of a table cell changes to match or stop matching your conditions, its styling updates to reflect that.
To learn how to use conditional formatting rules, see the Conditional Formatting customization option.
The following data table examples visualize data from a hospitality and property service. Each document in the collection represents a unit available for rent and includes information such as the monthly unit price, neighborhood, and property type.
The following data table categorizes the rental listings by property type and location, and shows the average review rating and average weekly rent for each group:
The Group encoding channels of
suburb create a row in the data table for each unique combination
of those two fields in the data.
The Values of
weekly_price each add a column to the table. For both values, we
average the rating and price for each
property type and
using aggregation and display the results in
the data table.
The results are formatted using the Customization tab to display the mean weekly price as currency and round the mean review score to an appropriate number of decimal places.
We have applied a filter to this
chart to only display listings which have a
associated with them.
The following data table displays nearly the same data as the previous
basic data table example. In this example, instead of making
field is now a Dynamic Column:
Now, rather than having two category columns in the table, the
property_types become column titles. We are still aggregating
the mean of the
weekly_price based on each combination of
The results are formatted using the Customization tab to display the mean weekly price as currency.
Blank table cells indicate that there are no documents that match
the corresponding intersection of
The maximum query response size for a data table is 50000 documents.