On the Sorting and detailed options tab of the Definition/modification of a table style dialog, you can define table sorting and summary parameters.

If a detailed table is selected, you can specify a Table sorting key, which lets you sort the element table by position-name (default), element type, section, or weight.
Summary table parameters (Sum data by rows or columns) is available only for Summary tables.