- Syntax
- Overview
- Concepts
- Examples Specifying the Sum Statistic in a Block ChartGrouping and Subgrouping a Block ChartSpecifying the Sum Statistic in Bar ChartsSubgrouping a Three-Dimensional Vertical Bar ChartControlling Midpoints and Statistics in a Horizontal Bar ChartGenerating Error Bars in a Horizontal Bar ChartSpecifying the Sum Statistic for a Pie ChartSubgrouping a Donut or Pie ChartOrdering and Labeling Slices in a Pie ChartGrouping and Arranging Pie ChartsSpecifying the Sum Statistic in a Star ChartCharting a Discrete Numeric Variable in a Star ChartCreating a Detail Pie Chart
- References

The percentage statistic
is calculated by dividing the frequency for each midpoint by the total
frequency count for all midpoints in the chart or group and multiplying
it by 100. For example, the frequency count for the

`Denver`

midpoint
is 7 and the total frequency count for the chart is 21, so the percentage
statistic for `Denver`

is 33.3%.
The cumulative percentage
statistic adds the percentage for the current midpoint to the percentage
for all of the preceding midpoints in the chart or group. For example,
the percentage for the

`Denver`

midpoint
is 33.3, and the percentage for the next midpoint, `Seattle`

,
is 42.9, so the cumulative percentage for `Seattle`

is 76.2.
The sum statistic is
the total of the values for the SUMVAR= variable for each midpoint.
For example, if you specify SUMVAR=SALES, and the values of the SALES
variable for the seven

`Denver`

observations
are `8734`

, `982`

, `1504`

, `3207`

, `4502`

, `624`

,
and `918`

, then the sum statistic for
the `Denver`

midpoint is 20,471.
By default, each observation
is counted only once in the calculation of the chart statistic. To
calculate weighted statistics in which an observation can be counted
more than once, use the FREQ= option. This option identifies a variable
whose values are used as a multiplier for the observation in the calculation
of the statistic. If the value of the FREQ= variable is missing,
0, or negative, the observation is excluded from the calculation.

If you use the SUMVAR=
option, then the SUMVAR= variable value for an observation is multiplied
by the FREQ= variable value for that observation when calculating
the chart statistic.

For example, to use
a variable called COUNT to produce weighted statistics, assign FREQ=COUNT.
If you also assign the variable HEIGHT to the SUMVAR= option, then
the following table shows how the values of COUNT and HEIGHT would
affect the statistic calculation:

By default, the percentage
and cumulative percentage statistics are calculated based on the frequency.
If you want to chart a percentage or cumulative percentage based
on a sum, you can use the FREQ= option to specify a variable to use
for the “sum” calculation. You can also specify the
PCT statistic, as shown in this example:

freq=count type=pct