The aggregation table widget gives you the ability to choose how you want to generate rows. You can add as many columns as you need and filter each of them independently. Then, aggregate the data in each of your columns on a row-by-row basis.
The example here uses a GPS event form to report session information for each position in the dataset. We’ve added columns for each metric we’re interested in and averaged them by position (note that it’s easy to use other aggregations instead of a mean). Each column can use separate filters, aggregation types and conditional formatting rulesets.
Use the sidebar to configure the aggregation table widget
Select the aggregation table widget to display the settings in the sidebar. These settings include:
- Column summary
- Advanced properties
- Data preview
Use the General properties of the sidebar to add descriptive information for your aggregation table widget. You can also:
- Choose whether the title of the widget should be displayed. If you enable this, then you can provide a title and icon for the widget and specify the font size, font color and text alignment.
- Choose whether a subtitle for the widget should be displayed. If you enable this, then you can add a subtitle for the widget and specify the font size, font color and text alignment.
- Specify the widget width within the section where it appears.
- Choose the background and border color for the widget.
Here you can add static informational content which will appear below the title of the widget. This can include text, images, tables, links and other common content tools.
To provide your aggregation table with a data source, use the Categories properties of the widget to choose a data source and select which field should be used to create the rows in the first column. To customize your categories further, you can:
- Set filters for the data you use to create the categories.
- Choose the category data type (number, string or date).
- Choose whether empty categories should be shown in the aggregation table.
- Specify whether the category values are derived from a multi-select field type.
- Choose how the categories are ordered in the aggregation table.
- Add a title for the category column.
- Provide a prefix or suffix for the category values.
- Choose which fields from your data source should appear in the record card if someone selects a category value in the aggregation table.
Use the Columns properties to select the information you want to aggregate. For each column you add to the aggregation table, you can:
- Provide a column title.
- Choose the data source for the column.
- Set filters for the data that will populate the column.
- Choose the field from your data source which will be displayed in the column.
- Choose which field from the category data source should be used to aggregate the column data. Most of the time you will use the same field that is shown in the first column of the aggregation table.
- Choose the column data type (number, string or date).
- Decide which aggregation is the most appropriate for the column data.
- Use the Advanced settings for each column to adjust:
- The number of decimal places shown (for numeric data).
- The text alignment of the column. This applies to both the header and the data in that column.
- Which fields should appear in the record card.
- Whether to apply any conditional formatting rulesets you have set up in the dashboard. Conditional formatting can be applied on a column by column basis and affects each table cell background and icon. Columns can be conditionally formatted based on any field within the data source by changing the conditional field setting in the sidebar. If your ruleset includes a range of different colors, you may wish to enable legible foreground color. With this enabled, the dashboard will automatically choose a legible text and icon color, depending on the color of each individual cell in that column.
- The column width (measured in pixels). If no width is selected, the table will automatically keep each column at an even width. Keep in mind that if you set the width of some columns but not others, the size of the screen the dashboard is being viewed on may impact the way the table will look. If the width of all columns is greater than the screen width when viewing your dashboard, you can scroll sideways to view the entire table.
- Whether the column should be hidden if it does not contain data. Specifically, if no records from the data source match the filter requirements of the column, it will be hidden. However, if one or more records match the filter requirements then the column will remain visible, even if the referenced field is blank.
Use the Column summary properties to aggregate each column in your table. For each column summary you add to the aggregation table, you can:
- Provide a row title.
- Choose the data type for the row.
- Choose the aggregation.
- Choose whether the column summary is an aggregate of the raw values, or an aggregate of the data displayed in the table.
You can enable avatars for the aggregation table using the Avatars properties. When you do this, an avatar will be shown in the first column (containing the category data) for each person whose data gets included in any of the aggregated columns. Depending on the number of people you expect to be included in the aggregation table results, you might want to change the avatar size and set a maximum number of avatars.
You can format the appearance of aggregation table contents using the Style properties. These allow you to adjust:
- The table font size, which is measured in pixels.
- The cell padding (also measured in pixels). This is the space between the contents of a cell in the table and the border of the cell.
- The border color of cells in the table.
- The background color for the header row.
- The text color for the header row.
- The background color for odd-numbered rows in the table. Note that the background color may be overridden if you are using conditional formatting within the table.
- The background color for even-numbered rows in the table. Note that the background color may be overridden if you are using conditional formatting within the table.
- The text color for the contents of the table. It’s important to choose the text color carefully to ensure it’s easy to read against the background colors in the table as well as any colors that are used in the ruleset you’ve created if you apply conditional formatting.
You can use the Layout properties to choose whether the header row or first column (containing the category data) should freeze in position when someone scrolls through the aggregation table. You can also use the layout properties to:
- Specify the maximum height of the aggregation table widget. This is measured in pixels.
- Choose the text alignment and width of the first column of the aggregation table, which contains the category data.
If you want to disable record cards and click-through for the entire aggregation table, you can use the Interaction properties to do this. Otherwise, you would use the Categories properties to format the record cards for the data in the first column of the table or the Columns properties to format the record cards for the data in each aggregated column of the table.
To learn more about widget interactions, visit the article on customizing widget interactions.
Use the Advanced properties for customizing your table further. Advanced properties for the aggregation table widget allow you to:
- Hide the first column which contains the category data.
- Hide the widget if no data is available (based on data source and filter settings).
The aggregation table widget has properties that allow you to choose how you want to preview your table. When using the dashboard builder, you’re not able to view real data entered by athletes, coaches or other users of your Smartabase site. So the dashboard builder shows you simulated data in order for you to see how your table might appear.
Use the Trellis properties to conditionally display the aggregation table multiple times based on a field within a data source. To customize your trellis, you can:
- Set filters for the data you use to create the trellis.
- Set a limit of how many multiples of the trellis should be displayed.
- Choose whether to display the title of each multiple (this is based on the trellis field selected). If you enable this, then you can specify the font size, font color and text alignment.
To learn more about widget trellising, check out this article.