Sort Options
You can access the Sort Options dialog box in the following ways:
- Ribbon bar. Select the Data tab. In the Cases group, click ">Sort to display the Sort Options dialog box, which contains options for sorting variables and cases.
- Classic menus. From the Data menu, select Sort to display the Sort Options dialog box, which contains options for sorting variables and cases.
Option | Description |
---|---|
Variables | The Variables grid contains all of the variables within the spreadsheet available for sorting. Note that the case names for all of the observations can also be used as a sorting key (select casename in the Variables grid and click the Add Vars button). |
Create Spreadsheet | Select the Create Spreadsheet check box to send the sorted results to a new spreadsheet. The source spreadsheet ordering will remain the same. Clear this check box to sort the original spreadsheet. |
Copy formatting | Select this check box to copy the source spreadsheet's formatting (e.g., font, background color) to the output spreadsheet. Note that the Create Spreadsheet check box must be selected for this option to be available. |
Add Vars | Select the variable(s) in the Variables grid that you want to sort by, and click the Add Vars button to move those variables into the Sorting Keys grid on the right side of the dialog box. Note that you can also drag and drop variables from the Variables grid to the Sorting Keys grid. |
Direction | The Direction group box contains the options for setting the sorting order of the currently selected variable(s). |
Ascending | Select the Ascending option button to set the sorting order of the currently selected variable(s) in the Sorting Keys grid to ascending. |
Descending | Select the Descending option button to set the sorting order of the currently selected variable(s) in the Sorting Keys grid to descending. |
Sort By | The Sort By group box contains the options for setting the comparison method of the currently selected variable(s). Comparison is how the items in a given variable are sorted. Note that when you add a new sorting variable (or sorting key) to the Sorting Keys grid, Statistica determines the most appropriate comparison method for that given variable (although you can change the sorting method if desired). |
Numeric | Select the Numeric option button to set the comparison method of the currently selected variable(s) in the Sorting Keys grid to numeric. Note that when you select Numeric, the underlying values of the data are used for comparison, i.e., dates are compared by their respective Julian values and Text Labels are compared by their respective numeric values. |
Text | Select the Text option button to set the comparison method of the currently selected variable(s) in the Sorting Keys grid to textual. When text labels are displayed (see View - Display Text Labels) in the spreadsheet, the cases will be sorted using those text labels. When text labels are not displayed (i.e., numeric values are displayed for some or all cases), then numbers are sorted according to their textual representation. For example, the values 1, 10, 2, 4, 41, 9 are sorted according to their textual representation (not numerically, as in 1, 2, 4, 9, 10, 41). Note that the textual comparison used is case insensitive and also employs your current locale's collation method. |
Remove Vars | Click the Remove Vars button to remove the selected variables from the Sorting Keys grid. Note that you can also remove the selected variables from the Sorting Keys grid by pressing the DELETE key on your keyboard. You can also drag variables from the Sorting Keys to the Variables grid to remove them from the Sorting Keys grid. |
Remove All | Click the Remove All button to remove all of the variables in the Sorting Keys grid. |
Sorting Keys Grid | On the right side of the Sort Options dialog box is a grid with the columns Direction, Variables, and Sort By. This grid contains all of the variables that you will be sorting by. The Direction column indicates whether a variable will be sorted ascending or descending, Variables indicates the names of the sort variables (or keys), and Sort By indicates the comparison method used during sorting.
Note that you can alter the direction of how a variable will be sorted by clicking on the cell in the Direction column next to the variable in question. When you click on the cell, a menu is displayed with the options Ascending and Descending:
Select either Ascending or Descending and the Direction of the currently selected variable in the grid will be updated. The Sort By column can be edited in the same manner. Note that, if you have multiple variables (or keys) that you will be sorting by, you can have different directions and sorting methods for the variables:
Note that when you have multiple sorting variables (or keys), the ordering of these variables affect the overall sorting of the spreadsheet. For example, if we choose to sort with the variables Gender and Measure01, then the spreadsheet will first be sorted by the variable Gender. If duplicate values are encountered in Gender, then those duplicate cases will be sorted by the variable Measure01. To put this another way, the spreadsheet will not use the variable Measure01 as a sort key unless duplicates are encountered in Gender. Basically, Measure01 is used as a "tie breaker" for duplicate values found in Gender. To change the priority of your sorting keys, select the variable(s) in the Sorting Keys grid that you want to move, and click the arrow buttons at the bottom of the dialog box. Click the down arrow to demote the selected variable(s) and click the up arrow to promote the selected variable(s).
Note that you can also drag and drop variables in the Sorting Keys grid to change their priority. |
Bundles | Click the Bundles button in order to select bundles of variables to add to the Sorting Keys grid. |
OK | Click the OK button to accept the settings and close the dialog box. Note that if nothing is listed in the Sorting Keys grid, whatever is highlighted in the Variables grid will be used as sorting keys. |
Cancel | Click the Cancel button to close the dialog box. Any changes made are disregarded. |
Copyright © 2021. Cloud Software Group, Inc. All Rights Reserved.