• Reference Guide

Table Summary

Table summary is the area displayed at the bottom of the table. It contains sums, averages, and other summary statistics of the table columns. The summary can be displayed or hidden by the button located near the upper right corner of the table. If some rows of the table are selected, an additional summary related to these rows is displayed.
Summary button
If checked, the table has a summary button, which can be used to display and hide the summary.
Show summary for folded sub-sequence
If the table has a sub-sequence (i.e. the data type of a column is another sequence), the contents of the sub-sequence cells can be folded so that only the number of the sub-sequence elements is displayed. If this option is checked, the summary is displayed by every folded sub-sequence.
Summary placement
Determines the summary location:
by table
the summary is always displayed underneath the table. If the table is long so that its lower edge is beyond the window edge, the summary is not visible.
by window edge
the summary is always displayed by the lower edge of the window regardless of whether there are other dispels below the table – they are placed between the table and the summary. This option is appropriate if there is a single table in the window.
always visible
combination of the by table and by window edge options – if the lower edge of the table fits into the window, the summary is there. As soon as the lower edge of the table moves beyond the window edge, the summary is displayed by the lower edge of the window so that it always remains visible. (Default setting.)
Summary items definition
The definition is a table, where every row defines one summary statistic. One summary row is then displayed for every row in the definition table. You can assign applicable data types to every summary statistic. The summary statistic is then displayed only for columns with the designated data type. Cells in this summary row under columns with other data types are empty. If no column complies with the summary statistic, the row is not displayed at all. You can assign summary exceptions to a column, that is, a different calculation method for a particular summary statistic. Summary exceptions can be also used to modify the dispel displaying the summary.
Summary statistic name. It must be an identifier.
The field is used to identify summary items in the summary data object – see below in the Summary Data Object section. It is also used to define summary exceptions – exceptions with the same identifier are displayed in the same summary row.
Name of the summary type displayed in the table context menu and in the summary tool tip.
Abbreviation characterizing the summary type – it is displayed on the left side of the summary row. Therefore, it should be very short, i.e. not exceeding three characters. If necessary, you can change its font size.
Initially hidden
Summary rows can be individually hidden or displayed. If this option is checked, the summary row is hidden even if the summary itself is displayed. You can hide/unhide individual summary rows in the table context menu.
Source type
You can select one ore more column data type classes to which the summary is applied:
any integer number type (Int8, Int16, Int32, Int64, Byte, Word, Dword, Qword).
Real number
Real type.
String type.
formatted string or text (Rich_string, Rich_text).
An Enki language function calculating the summary value. You can select the result type before entering the actual source text of the function.
The following symbols are available for the function definition:
the sequence for which the summary is calculated. For normal summaries, it is the sequence edited by the table; for summaries restricted to selected rows, it is an inferred sequence containing only the selected rows.
reference to the table row component corresponding to the column for which the summary is calculated.
the true data type of the column for which the summary is calculated. You can use it, for example, to define a variable: var data_type x.
data object containing calculated summary values for all types and columns. You can use it, for example, to calculate the summary value from another summary statistic (e.g. to calculate average from sum). The structure of the object is described further on.
Example 1: standard definition of the “sum” summary statistic.
for(&i = seq, 0.0)
(@i + try i.(ref) else 0.0)
A for cycle with aggregation is used in the calculation. The try command is used for optional data – missing values are interpreted as zero.
Example 2: standard definition of the “average” summary statistic.
summary.(ref).sum / size(seq)
The “sum summary statistic is used to calculate the average. At the same time, column reference (ref) is used to reference the column summary. The sum itself is identified by the sum identifier (see the table of standard summary statistics below). The try command is used in case of the sequence being empty. Division by zero occurs in this situation. The function then returns the NOT_PRESENT value indicating that the value is not specified.
Definition type: Summary_info

Summary Data Object

A data object is created for the calculation of summary statistics containing all summary statistics for all columns, represented by computed items. The summary data object is available under the summary_root identifier. The summary contains two structures at the top level – one for the overall summary and the other for the summary of selected table rows:
Components of the overall summary.
Components of the summary of selected rows.
One of these components is always accessible to the dispels within the summary under the summary identifier. Which component is thus accessible depends on whether the dispels are located within the overall part of the summary or within the part corresponding to the selected rows only. Therefore, using the summary identifier enables using the same presentation for the both parts of the summary.
Each of aforementioned structures (accessible via the summary identifier) has the following components:
The sequence for which the summary is calculated. In the all branch, it is a forwarded item pointing to the table data; in the marked branch, it is an inferred sequence containing only selected table rows.
A list of items containing individual summary values (computed data items). Their references take the form of (ref).(id), where (ref) refers to the data of the column for which the summary is calculated, relatively to the table row, and (id) is the summary type identifier (see the Identifier field above in the summary statistics table).
Example: suppose a table has a column called employee, which is a structure containing the salary item. Full reference of employee average salary in the table is:
(Suppose the standard average identifier is used for the average summary statistic.)

Standard Summary Statistics

By default, the following summary types are defined for tables:
Sum of squares
Standard deviation