average
average

The average statement calculates averages and sub-averages for the selected records in the current field.

Parameters

No parameters.

Description

This statement calculates averages for the current field. The current field must be numeric. If the database contains summary records, this statement will calculate sub-averages for each summary record, along with an overall average for the whole database. If there are not any summary records in the database, one will be added at the end of the database and the overall average will be calculated and placed into the summary record.

This simple example calculates the average of the Balance field.

    field Balance
    average

This example calculates the average invoice amount in each state, along with the overall average.

    field State
    group
    field Sales
    average

See Also

- analyzedialog -- opens the standard Analyze dialog.
- collapse -- hides the detail records associated with the currently active summary record.
- collapsetosummary -- collapses to the next higher summary level.
- count -- counts all non-empty data cells for the current field.
- expand -- reveals the next level of collapsed detail records associated with the currently active summary record.
- expandall -- reveals all collapsed detail records associated with the currently active summary record.
- groupdown -- divides the database into groups, with a summary record at the end of each group. The groups are arranged in descending order (high to low).
- groupup -- divides the database into groups, with a summary record at the end of each group. The groups are arranged in ascending order (low to high).
- info("collapsible") -- checks to see if the current record is collapsible.
- info("expandable") -- checks to see if the current record is expandable.
- maximum -- calculates the maximum and sub-maximums for the current field.
- minimum -- calculates the minimum and sub-minimums for the current field.
- removeallsummaries -- removes all summary records.
- removedetail -- removes data records from the current database, leaving only summary records. It can also delete low level summary records, leaving only higher levels.
- removesummaries -- removes summary records from the current database.
- total -- calculates totals and subtotals for the current field.

History

Version | Status | Notes
10.0 | No Change | Carried over from Panorama 6.0.