removedetail
removedetail
LEVEL

The removedetail statement removes data records from the current database, leaving only summary records. It can also delete low level summary records, leaving only higher levels.

Parameters

This statement has one parameter:

level – specifies the minimum summary level that will not be removed. In other words, if you want to remove only data records this value should be zero. If you want to remove data records and the first level of summary this value should be 1, etc. This value may be between 0 (data records) and 6 (highest level summary), however, it should not be more than one less than the highest summary level in the database. (You can determine the highest summary level available using the dbinfo(“maxsummarylevel”) function.)

Description

This example calculates summaries for each company, then saves those summaries in a separate database. The Company Totals database will not have any of the original data, only the summary information (which will have been converted into data records for possible further processing.)

    field Company
    group
    field Amount
    total
    removedetail 0
    saveas "Company Totals"

Error Messages

RemoveDetail statement cannot remove all data from the database – This message will be generated if the level parameter is equal to or above the maximum summary level currently in the database.

See Also

- analyzedialog -- opens the standard Analyze dialog.
- average -- calculates averages and sub-averages for the selected records in the current field.
- 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.
- removesummaries -- removes summary records from the current database.
- total -- calculates totals and subtotals for the current field.

History

Version | Status | Notes
10.0 | Updated | Carried over from Panorama 6.0, but no longer supports the dialog option.