For the latest version of JMP Help, visit JMP.com/help.

Using JMP > Reshape Your Data > Sort Data Tables
Publication date: 09/28/2021

Sort Data Tables

You can sort a JMP data table by columns in either ascending or descending order. By default, columns sort in ascending order. You can either create a new table that contains the sorted values, or you can replace the original table with the sorted table.

If columns contain value labels, sorting is based on the actual data values, not the value labels. (See Value Labels.) However, the value labels are displayed in the sorted data table.

If your sorted column uses either the Value Order property or the List Check property, the column is sorted according to that order.

Example of Sorting Data Tables

1. Select Help > Sample Data Library and open Popcorn.jmp.

2. Select Tables > Sort.

Figure 6.5 The Sort Window 

The Sort Window

3. Highlight the names of the columns that you want to sort by. For this example, select popcorn and yield.

4. Click By to add the columns to the sort list.

The columns that you add to the list establish the order of precedence for sorting. The first column in the list is the major sort field. Each variable thereafter is sorted within the previous variable in the sort list. You can drag and drop within the By list to change the sort order.

5. Customize your sort further using the additional options. For this example, highlight yield and click the descending button.Image shown here

6. Enter a name for the new sorted table in the box beside Output table name. For this example, enter sorted popcorn.

Figure 6.6 Completed Sort Window 

Completed Sort Window

7. Click OK.

Figure 6.7 Sorted in Ascending and Descending Order 

Sorted in Ascending and Descending Order

Sort Options

Select Columns Filter Menu

Contains options to search and filter through columns. See Column Filter Menu.

Replace Table

Replaces the original data table with the sorted table instead of creating a new table with the sorted values. This option is not available if there are any open report windows generated from the original table.

Output table name

(Optional) Specifies the name of the sorted table.

Keep dialog open

Keeps the Sort window open after you click OK.

Save Script to Source Table

Saves a script to the original data table that enables you to sort the data again using the same settings.

By

Adds the columns that you want to sort by. The columns that you add to the list establish the order of precedence for sorting. The first column in the list is the major sort field. Each variable thereafter is sorted within the previous variable in the sort list.

Remove

Removes any highlighted columns.

Ascending and descending buttons (Image shown here)

You can change the ascending or descending list order of the values for the grouping variables. In the By variable list, select a variable and click the appropriate ascending or descending button. The icon beside the variable changes to indicate the sorting order.

Save Default Options

Saves the current settings as the new default options.

Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).