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.
In the sidebar
General: use the general properties of the sidebar to add descriptive information for your aggregation table. 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 colour 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 colour and text alignment.
- Specify the widget width within the section where it appears.
- Choose the background and border colour for the widget.
Categories: 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 customise 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.
Columns: 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.
- Which fields should appear in the record card.
- Whether to apply any conditional formatting rulesets you have set up in the dashboard. When conditional formatting is enabled, you can choose whether you want the column to use a legible foreground colour, so the information is clear regardless of the colour of the individual cell.
- The column width (measured in pixels).
- 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.
Column Summary: 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.
Avatars: 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.
Style: 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 colour of cells in the table.
- The background colour for the header row.
- The text colour for the header row.
- The background colour for odd-numbered rows in the table. Note that the background colour may be overridden if you are using conditional formatting within the table.
- The background colour for even-numbered rows in the table. Note that the background colour may be overridden if you are using conditional formatting within the table.
- The text colour for the contents of the table. It’s important to choose the text colour carefully to ensure it’s easy to read against the background colours in the table as well as any colours that are used in the ruleset you’ve created if you apply conditional formatting.
Layout: 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.
Interaction: 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 customising widget interactions.
Advanced Properties: the advanced properties can be used to set whether the first column (containing the category data) should be visible or not.
Data Preview: 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 aggregation table widget allows you to choose how many categories you want to see in the table as you build your dashboard. This is so you can more easily see how your widget might appear to users of your Smartabase site.