groupup
PERIOD
The groupup statement 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).
Parameters
This statement has one parameter:
period – identifies the span of each group. This parameter is optional, and only applies if the current field is a date field (it will be ignored for any other type of group). The options for this parameter are listed below. Use the options exactly as shown, with no quotes.
- by Day
- by Week
- by Month
- by Quarter
- by Year
If the current field is a date field and this parameter is omitted, the database will be grouped by day.
Description
This statement divides the database into groups according to the current field. For example if the current field contains company names there will be one group per company, if the current field contains zip codes there will be one group per zip code. If the current field contains dates it may be grouped by day, week, month, quarter or year.
This example calculates summaries for cities and states, then displays the summary information. The outlinelevel statement collapses the outline so that the raw data is hidden and only the subtotals are displayed.
field State
groupup
field City
groupup
field Amount
total
outlinelevel 1
This example calculates totals for each month.
field Date
groupup by month
field Debit
total
Grouping by Weeks
This example calculates totals for each week.
field Date
groupup by week
field Debit
total
When grouping by weeks, Panorama checks the system preferences to see what day is the first day of the week. This is usually Sunday in the United States, but it can be different in other parts of the world, and it can be changed in the System Preferences Language & Region panel.
The group statement will honor this preference setting, so if the first day of the week is set to Monday, Saturday, or some other day, that is the day that will be used when grouping by weeks.
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).
- importdatabasedialog -- opens the standard Import Database dialog.
- 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.
- reverseorder -- reverses the order of the records in the database.
- sortdialog -- opens the standard *Sort* dialog.
- sortdown -- sorts the database by the current field. The database is sorted in descending order (high to low).
- sortdownwithin -- sorts the database by the current field, leaving any previous sorts intact. The database is sorted in descending order (high to low).
- Sorting Data -- sorting data into a specific order.
- sortup -- sorts the database by the current field. The database is sorted in ascending order (low to high).
- sortupwithin -- sorts the database by the current field, leaving any previous sorts intact. The database is sorted in ascending order (low to high).
- total -- calculates totals and subtotals for the current field.
History
10.0 | Updated | Carried over from Panorama 6.0, but when grouping by weeks the system preferences for first day of the week are now honored. |