Skip to main content

By Percent

Syntax

By Percent field_name

Parameters

  • field_name: The name of the field to group by (e.g., SEX, TSHIRT).

Description

Works exactly like the By command, but adds the percentage for each group relative to the total.

Remarks

This is most useful for creating quick tally reports, such as finding the percentage of men and women in the race or the distribution of T-shirt sizes.

Examples

To get a tally and percentage for T-shirt sizes:

By Percent TSHIRT

Output might look like:

TSHIRT = S 27 29.2%
TSHIRT = M 197 21.3%
TSHIRT = L 589 63.6%
TSHIRT = X 113 12.2%