This article describes how to go from an unsorted table...
...to a table that has been sorted automatically by row according to a specified column:
Method
1. Select your table.
2. In the toolbar go to Automate > Browse Online Library > Sort/Reorder Rows or Columns > Sort Rows (Automatically Updates When Data Changes).
3. Select the Sort method for ascending or descending.
4. Choose the Column selection method. This can be based on the largest, last, or a specified column. If you only have a single column, this can be left as default.
5. The Exclude from sort (in addition to NET/SUM) option ensures that any specified rows remain at the bottom of the table. In this example, Don't care has been entered to prevent it from being sorted. This text is not case-sensitive.
6. OPTIONAL: The Never exclude from sort field can be used when the rule automatically sorts a category that shouldn't be sorted. For example, if you have the word Others in your row label, adding Others to this field will ensure it is not mistaken for an Other/Specify option and left at the bottom of the table. This text is not case-sensitive.
7. Press OK.
Note the following:
- The table will be sorted using the first statistic shown on the table.
- By default, if there are multiple columns in the table, the rule will sort according to the largest column (according to the Column n in the Statistics - Below). Using this option:
- This script will have no effect when Column n is not available from the Statistics - Below.
- If two or more columns have the same value for Column n then the table will be sorted according to the right-most column with that value of Column n.
- Rows that look like they are Don't Know, Other/Specify, All of these, or None of these responses will be left at the bottom of the table, as will NET and SUM rows.
- Values of NaN are treated as the largest possible negative number for the purpose of sorting, which means that they will always be placed below other rows when sorting from highest to lowest (excepting those rows that have been excluded from the sort).
- When the table has spans in the rows, the rows of the table will be sorted within the spans.
- When the underlying data updates, the table sorting will automatically update according to the rule conditions.
- When the rule is applied to multiple tables and being sorted by column name, the exact same column name must be in all tables the rule is applied to. If you want to change the sorting settings for a particular table, you will need to create a "fresh" version of the rule from the Automate menu to adjust the settings for that table.