Articles on: Q&A

How to use the "Group by" option with the Table or Container component?

The "Group by" option for Table and Container component allows you to easily group your data sets by specific data field. At the moment the data field needs to be present in the data set and you cannot use aggregated or calculated values. The "Group by" option for the Table and Container component can be found in the Advanced Settings.

Number formatting must be used to use functions like sum, count and avg.
You need to use data field name without the parent e.g {% sum({quantity}) %} instead of {% sum({line_items::quantity}) %} as the last one always gets all rows in line_items array.
When using "Group by" with Container and Table, you can use {% count({grouped_rows}) %} to get the count of items in the current group.



Updated on: 30/04/2021

Was this article helpful?

Share your feedback

Cancel

Thank you!