# PSPP for Beginners: Sorting Data

## How to organize data by sorting

Sometimes it is useful to sort the cases into groups. For example, a teacher might want to sort class grades from the highest to the lowest to identify the top and bottom students in a class. This feature is comparable to the data sorting features of spreadsheets.

PSPP has several possibilities for sorting data. The Data menu has a Sort Cases command.

The Sort Cases dialog box has a list of variables on the left and a blank Sort by field on the right.

Choose the variables that you want to use by moving them to the Sort by field. The order is important, with the first field being the most important. For this example let's sort the data file by Sex and then by Last name. The Sort Order Ascending option will organize the cases from lowest to highest. The Descending option is from highest to lowest. Click the okay button when you are finished.

The data fields are now grouped into males (first two rows) and females.

Home | Start | Variables | Data | Descriptive | Relationship | Inferential | Advanced | Video

This work is licensed under a Creative Commons Attribution 4.0 International License that allows sharing, adapting, and remixing.