Overview (OLAP CUBES command)
OLAP CUBES
produces summary statistics for continuous, quantitative variables
within categories defined by one or more categorical grouping variables.
Basic Specification
The
basic specification is the command name, OLAP CUBES
, with a summary variable, the keyword BY
, and one or more grouping variables.
- The minimum specification is a summary variable,
the keyword
BY
, and a grouping variable. - By default,
OLAP CUBES
displays a Case Processing Summary table showing the number and percentage of cases included, excluded, and their total, and a Layered Report showing means, standard deviations, sums, number of cases for each category, percentage of total N, and percentage of total sum.
Syntax Rules
- Both numeric and string variables can be specified. String variables can be short or long. Summary variables must be numeric.
- String
specifications for
TITLE
andFOOTNOTE
cannot exceed 255 characters. Values must be enclosed in quotes. When the specification breaks on multiple lines, enclose each line in quotes and separate the specifications for each line by at least one blank. To specify line breaks in titles and footnotes, use the\n
specification. - Each subcommand can be specified only once. Multiple use results in a warning, and the last specification is used.
- When a variable is specified more than once, only
the first occurrence is honored. The same variables specified after
different
BY
keywords will result in an error.
Limitations
- Up to
10
BY
keywords can be specified. - See SET TABLERENDER for information on how multiple layer dimensions are rendered in lightweight tables.
Operations
- The data
are processed sequentially. It is not necessary to sort the cases
before processing. If a
BY
keyword is used, the output is always sorted. - A Case Processing Summary table is always generated, showing the number and percentage of the cases included, excluded, and the total.
- For each combination of grouping variables specified
after different
BY
keywords,OLAP CUBES
produces a group in the report.