Tables display your data in a grid of rows and columns. Each column represents a dimension or metric, while each row is one record of your data.In this article:
Tables in Data Studio
Tables in Data Studio automatically summarize your data. Each row in the table displays the summary for each unique combination of the dimensions included in the table definition. Each metric in the table is summarized according to the aggregation type for that metric (sum, average, count, etc.). A Data Studio table can have up to 10 dimensions and 20 metrics.
Here is some sales data for a fictional pet store. The store sells items for dogs, cats, and birds, with several products in each category.
|Happy Cat Catnip||Cat||1|
|Healthy Dog Dog Food||Dog||3|
|Pretty Bird Bird Seed||Bird||5|
|Pretty Bird Bird Seed||Bird||3|
|Happy Cat Catnip||Cat||2|
|Playful Puppy Toy||Dog||6|
|Pretty Bird Bird Seed||Bird||7|
A simple Data Studio table showing just the category dimension and quantity metric looks like this:
Example table 1
In example 1, Data Studio has aggregated the quantities sold per category. Since there are only 3 categories in the data set, the table shows just 3 rows.
Now let's add the Item dimension to the table:
|Bird||Pretty Bird Bird Seed||20|
|Dog||Healthy Dog Dog Food||17|
|Dog||Playful Puppy Toy||10|
|Cat||Happy Cat Catnip||
|Cat||Hungry Kitty Cat Food||3|
Example table 2
In example 2, the table contains 6 rows, 1 for each item. The quantity sold metric is now aggregated per item.
Add a table to your report
To add a table to a report:
- Edit the report.
- At the top, click Add a chart.
- Select a default table style.
- For example, you can add a standard table, a table where the metrics are displayed as bars, or a table with a heatmap applied.
- Drag the chart to the desired location on the page and resize it to the desired dimensions.
- Use the properties panel on the right to add metrics and dimensions and to style the table.
Adjust column size
To manually change the size of individual columns in the table, click a column divider and drag it. To resize multiple columns at once, hold the Shift key while dragging a column divider.
You can also apply automated column resizing:
- Right-click the table, then select the Resize columns option:
- Fit to data sizes each column in the table to the optimum width according to the data.
- Distribute evenly makes all the columns equal width.
Watch a demonstration of resizing table columns
The options in a chart's data properties panel affect how the data is organized and displayed.
A data source provides the connection between the component and the underlying data set. Data source options are:
- To change the chart's data source, click the current data source name.
- To view or edit the data source, click . (You must have at least view permission to see this icon.)
- Click +BLEND DATA to see data from multiple data sources in the same chart. Learn more about data blending.
Dimensions are data categories. Dimension values (the data contained by the dimension) are names, descriptions or other characteristics of a category.
Add dimensions to the chart by dragging fields from the Available Fields panel on the right. You can also click Add dimension in the Data tab.
Tables can have up to 20 metrics. The number of dimensions you can add depends on the data source used by that table. Tables using the following connectors can have up to 20 dimensions:
- Google Sheets
- Google BigQuery
- Cloud SQL for MySQL
- File Import
- Google Cloud Storage
- Extracted data sources
- Blended data views
Tables based on other data sources can have up to 10 dimensions.
Sort your data
Viewers of your reports can sort the data by clicking on a column header. Each click reverses the sort order: e.g., click once to sort in ascending (lowest to highest) order, click again to sort in descending (highest to lowest) order. In the example above, the table is sorted by Qty Sold in descending order. Viewers can still sort the chart even if the editor has defined a default sort.
Set the default sort
The Sort and Secondary sort options in the chart's DATA properties panel control the default sorting behavior. You can select any metric in the chart's data source, or any dimension currently displayed in the chart, to use as the primary or secondary sorting field.
Rows per page
Use the Rows per page option to control how many table rows to display per table page. Show pagination must be enabled for this to take effect.
Show summary row
The Show summary row option toggles display of a row at the bottom of a table summarizing each metric column.
Default date range
The default date range property lets you set a timeframe for an individual chart.
Default date range options
|Auto||Use the default date range determined by the chart's data source.|
|Custom||Lets you use the calendar widget to select a custom date range for the chart.|
|Date compare type||Displays comparison data for the selected time period.|
The filter property restricts the data displayed in the component by including or excluding the values you specify. Learn more about the filter property.
|Filter name||Click an existing filter to edit it. Mouse over the filter name and click X to delete it.|
|+Add a filter||Creates a new filter for the chart.|
When interactions are enabled on a chart, that charts acts like a filter controls. You can filter the report by clicking or "brushing" your mouse across the chart. Learn more about chart interaction filters.
A chart's style properties control the overall presentation and appearance of the chart.
These options control the appearance of the table header and column labels.
|Show header||Shows or hides the table header. Note that viewers can't sort tables with hidden headers.|
|Wrap text||Wraps header text.|
|Header font color||Sets the font color of the table header.|
|Header font size||Sets the font size of the table header.|
|Header font family||Sets the font family of the table header.|
These options control the colors of the table borders and cells.
|Header background color||Sets the color of the table header background.|
|Cell border color||Sets the color of the border between rows.|
|Odd/Even row color||Sets the color of odd or even rows in the table.|
These options control the appearance of the table data.
|Font color||Sets the font color of the data.|
|Font size||Sets the font size of the data.|
|Font family||Sets the font family of the data.|
|Heatmap text contrast||Sets the font color automatically when displaying a heatmap. Choose from 3 levels of contrast, low, medium, or high.|
These options control the appearance of the table body.
|Row numbers||Adds row numbering as the leftmost column of the table.|
|Wrap text||Wraps long text in the table body.|
These options control the appearance of the table footer.
|Show pagination||Pagination lets the viewer navigate through long tables. Show or hide the page controls with this option.|
|Compact pagination||Reduces the vertical spacing of the pagination controls.|
|Footer border color||Sets the footer border color.|
|Footer border weight||Sets the thickness of the footer border.|
|Footer border style||Sets the line style of the footer border.|
This option controls how to display missing values. For example, when data is missing from the table, you can choose to show blanks, hyphens, or the words "no data."
Dimension and metric appearance
These options control the display of your dimension and metric columns. Each column in your table has a corresponding numbered section in the properties panel: from left to right, the first metric in the table is Column #1, the second metric is Column #2, and so on. You can set the following options for each column:
|Alignment||Aligns the data in the column left, right, or center.|
|Compact Numbers||Rounds numbers and displays the unit indicator. E.g., 553,939 becomes 553.9K.|
|Decimal Precision||Sets the number of decimal places in metric values.|
|Show target||Appears when the column type is set to Bar. Shows a target line for the value set in the target value field, similar to a bullet chart.|
|Show axis||Displays an X-axis for the bar chart.|
The chart header lets viewers perform various actions on the chart, such as exporting the data, drilling up or down, and viewing the chart in the Explorer tool. Chart header options are:
|Show on hover (default)||Three vertical dots appear when you mouse over the chart header. Click these to access the header options.|
|Always show||The header options always appear.|
|Do not show||The header options never appear. Note that report viewers can always access the options by right clicking the chart.|
|Color||Set the color of the chart header options.|