When a Table control contains numeric data, it may be useful to find out the total of a column or to count the number of elements.

WINDEV allows you to automatically perform and display calculations for the columns:

sum,

mean,

count,

Versions 22 and later maximum,

New in version 22 maximum,

maximum,

Versions 22 and later minimum.

New in version 22 minimum.

minimum.

Examples of calculations performed in the columns of a Table control:

the total number of parts ordered,

the number of students with an email address,

the average sum spent by each customer.

Versions 22 and later

By programming, you also have the ability to define specific calculation formulas and to display the result at the bottom of the relevant column. See Programming custom calculations in the tables for more details.

New in version 22

By programming, you also have the ability to define specific calculation formulas and to display the result at the bottom of the relevant column. See Programming custom calculations in the tables for more details.

By programming, you also have the ability to define specific calculation formulas and to display the result at the bottom of the relevant column. See Programming custom calculations in the tables for more details.

Defining the calculations to perform

To perform one or more calculations on a column:

Open the Table control description window ("Description" in the popup menu).

Select the name of a column for which a calculation must be performed.

Display the "Details" tab of this column (in the lower part of the screen).

Select the calculations to perform:

sum of column cells,

average of column cells,

count of non-null values in the column. If the Table control contains merged cells, they are considered as having a null value.

Versions 22 and later Minimum of values of column cells.

New in version 22 Minimum of values of column cells.

Minimum of values of column cells.

Versions 22 and later Maximum of values of column cells.

New in version 22 Maximum of values of column cells.

Maximum of values of column cells. Remark: The available calculations depend on the type of column. The counter is available for all types of columns.

Repeat the operations 2 to 4 for all the columns on which a calculation must be performed.