When you sort a table that has multiple variables in the dimension in which you are sorting, where the variables have been added using the Add button, the elements within each variable are sorted separately. For example, the following table uses the Museums sample data set, with Age and Gender added on the side of the table, and Biology and Before on the top of the table. The rows are sorted by their values in the Before column. To do this, you select before{Base} from the Sort rows based on list box in the Sort tab of the Table Properties dialog box. See the topic Sorting a Table for more information.
Here is the table, with the sort column highlighted:
Notice that the rows that relate to the Age variable have been sorted separately from the rows that relate to the Gender variable.
If there is nesting in the dimension of the table in which the sort row or column is located, the sorting list boxes display the combined sort options. In the following nested table, the rows are sorted on the Base column of the Before variable that is nested within the Yes category of the Biology variable. To do this, you select the biology{Yes} > before{Base} option from the Sort rows based on list box.
Here is the table, with the sort column highlighted:
Note that the sort order would be different if you sorted the rows on the Base column of the Before variable that is nested within the No category of the Biology variable.
When you sort a table that contains nesting in the dimension in which you are sorting, the elements within the inner variables are sorted. However, the elements of the outermost variable are not sorted. For example, the following table has Education nested within Interview on the side of the table, by Gender on the top of the table. The rows of the table are sorted by the values in the base Gender column. To do this, you select the Gender{Base} option from the Sort rows based on list box.
Here is the table, with the sort column highlighted:
You cannot sort an axis that contains a combination of nested and added (concatenated) variables. However, you can use that axis to sort the other axis of the table (provided that this does not also contain both nesting and concatenation).