Displaying Statistical Information

Tip: See "Computed Fields" if you are looking for information about computed fields.

A "Stats Box" is a different type of computed field which you can place on top of a record list window in order to display some statistical information about all of the currently displayed records. Its configuration is very similar to a computed field but it uses a different set of built-in math functions.

You can add more than one stats box. However, keep in mind that SpeedBase will automatically hide stats boxes starting from the most right side position if there is not enough horizontal space to fit them all. You may consider to resize / maximize the window in that case.

Note that you should type a dot, not comma, when you need to use decimal marks.

In the example picture below, the sum of all payments of the displayed records is calculated by a stats box with an expression of fieldSum("payment").

Creating / Updating Stats Boxes

Box Width: Adjust the width of the output box in pixels.
Label: Enter a descriptive name to be displayed with the stats box.
Align: The stats box can optionally be aligned to the right side of the window.
Invisible: Hide the stats box.

Available functions and examples are given below. Function names are not case sensitive.

Special Functions Dedicated to Stats Boxes

RecordCount or RecordCount("ViewName")

Returns the number of records existing in the specified view whose name is given in quotes. You can call it without the view name parameter if you need the number of records in current view.

FieldSum("FieldName") or FieldSum("FieldName", "ViewName")

Returns the numeric sum of the field specified in quotes for all of the records currently listed.
Assume that you have a "Tasks" catalog and you save the time spent for each task into a numeric field named as "Hours".
This expression will show the total hours spent for all tasks listed in current view.
Assume that you have a "Expenses" catalog, where you record all expenses into the field name "cost".
Assume also that you have created the view "Expenses in last week" and assigned a filter to it which displays only the records created in last week.
This expression will show the total expense in last week.
FieldSum("cost","Expenses in last week")

FieldAvg("FieldName") or FieldAvg("FieldName","ViewName")

Returns the numeric sum of the field specified in quotes divided by the number of records currently listed.
Used exactly in the same way as FieldSum function.

All other Functions

See Function Reference page for more information.

If you are unsure how to build the right expression, request support.

Online Help Home Page   ::   SpeedBase Software Home Page