Sort

<< Click to Display Table of Contents >>

Navigation:  Reference > Transforms >

Sort

Description

Sorts rows by one or more columns.

 

Examples

Sort by 'Last' and then First' columns:

 

how to sort by multiple column values example

 

Sort by 'Category' and then 'Score' columns. Rank for each distinct 'Category' value:

 

Sort table with ranking by category

 

 

Inputs

One.

 

Options

Click the add-button@1x button to add a new sort level.

Click the arrow-up@1x button to move the selected sort levels up.

Click the arrow-down@1x button to move the selected sort levels down.

Click the remove-button@2x button to delete the selected sort level(s).

Click the cancel@1x button to clear all sort levels.

Set Column to the column you want to sort by.

Set Order depending on whether you want to sort this column Ascending or Descending.

Check add rank to add a ranking column

oSet Rank type according to how you wish to do the ranking:

Minimum: Uses the minimum rank of each group.

Average: Uses the average rank of each group.

Maximum: Uses the maximum rank of each group.

Dense: Each successive rank is only incremented by 1. There are no gaps.

Cumulative: Shows the proportion of rows (0 to 1) with the same or lower numbered rank.

 

For example:

 

Sorted scores example

 

Gives the following rankings, depending on Rank type:

 


Rank type

Sorted score

Minimum

Average

Maximum

Dense

Cumulative

131

1

1

1

1

0.167

123

2

3

4

2

0.667

123

2

3

4

2

0.667

123

2

3

4

2

0.667

120

5

5.5

6

3

1

120

5

5.5

6

3

1

 

oSet Rank by to rank separately for each distinct value in this column. Leave as <None selected> if you only want a single ranking for all rows.

 

Notes

If you add multiple levels, it will sort by level 1 then level 1 values that are the same will be sorted by level 2 etc.

Number, date and text values are treated differently for sorting purposes.

Any values that can be converted to numbers will be treated as numbers.

Any values that match the supported date formats in Preferences will be treated as dates.

Comparisons of text are case and whitespace sensitive. You can use Case to change the case and Whitespace to remove whitespace before sorting.

If you want to rank rows without losing the original order, use Row Num to add a row number before the Sort, and then use another Sort on the Row Num column to return to the original order.

Unsorted columns can be sorted into any order and this may vary between different released of Easy Data Transform and Windows and Mac versions.

 

See also:

Video: How to rank data