User Tools

Site Tools


transformations:sort

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
transformations:sort [2015/04/10 15:52] elenaptransformations:sort [2021/07/18 23:13] (current) craigt
Line 1: Line 1:
-===== Sort =====+{{ transformations:SortAction.png}} 
 +====== SORT ====== 
 +Category: Transform / Basic\\
  
-This transformation sorts the table by one or more columns in ascending or descending order. Order of the columns matters.+\\  
 +=====Description===== 
 +This action sorts the table by one or more columns in ascending or descending order. Order of the columns matters.
  
-Since values of a column can be of mixed types, the sorting order depends on the value type. For ascending sorting, the order is the following:+Since the values of a column can be of mixed types, the sorting order depends on the value type.  For ascending sorting, the order is the following:
   * Errors   * Errors
   * Empty cells   * Empty cells
Line 10: Line 14:
   * Numbers   * Numbers
  
-In descending order, the sorting order is exactly the opposite.+In descending order, the sorting order is the reverse.\\
  
-EXAMPLE+\\  
 +=====Use cases===== 
 +  *To find the least/greatest amounts in a column. (numeric) 
 +  *To create an alphabetized list.  (text) 
 +  *To establish a date-time ordered list.  (date) 
 +  *To discover errors in a column by grouping them at the top/bottom of the column.  (error) 
 + 
 + 
 +\\  
 +=====Action settings===== 
 +^Setting^Description^ 
 +|Columns|Select the column to arrange the values of. | 
 +|Sort order|Options:  //Ascending// and //Descending// This setting determines the order of the sort for the selected column.| 
 +Additional columns can be added to the sorting criteria by clicking the //Sort by more columns// option.\\ 
 + 
 +\\  
 +=====Examples===== 
 +**Example 1 (single-column sort):**  Arrange the rivers in alphabetical order.
  
 **Source table:** The longest rivers in the world **Source table:** The longest rivers in the world
  
- River  ^  Length (km)  ^  Continent +^River  ^Length (km)  ^Continent 
-| Nile  |  6650   Africa +| Nile  |  6650|Africa 
-| Amazon  |  6400   South America +| Amazon  |  6400|South America 
-| Yangtze  |  6300   Asia  | +| Yangtze  |  6300|Asia 
-| Mississippi  |  6275   North America +| Mississippi  |  6275|North America 
-| Yenisei  |  5539  |  Asia  | +| Yenisei  |  5539|Asia  | 
-| Yellow River  |  5464  |  Asia  | +| Yellow River  |  5464|Asia 
-| Ob  |  5410  |  Asia  | +| Ob  |  5410|Asia 
-Paraná  |  4880   South America  |+| Paraná  |  4880|South America 
 +\\  
 +**Action parameters:** 
 +>  Column: River 
 +>  Sorting order: Ascending 
 + 
 +\\    
 +**Result table:** 
 +^River  ^Length (km)  ^Continent 
 +| Amazon  |  6400|South America 
 +| Mississippi  |  6275|North America 
 +| Nile  |  6650|Africa 
 +| Ob  |  5410|Asia 
 +| Paraná  |  4880|South America 
 +| Yangtze  |  6300|Asia  | 
 +| Yellow River  |  5464|Asia  | 
 +| Yenisei  |  5539|Asia  | 
 + 
 +\\  
 +\\  
 +**Example 2 (two-column sort):**  Arrange values in ascending order by Continent, then River (using the source table above).\\ 
 +\\  
 +**Action parameters:** 
 +>  Column, Sorting order: Continent, ascending 
 +>  Column, Sorting order: River, ascending 
 + 
 +\\    
 +**Result table:** 
 +^River  ^Length (km)  ^Continent 
 +| Nile  |  6650|Africa  | 
 +| Ob  |  5410|Asia  | 
 +| Yangtze  |  6300|Asia  | 
 +Yellow River  |  5464|Asia  | 
 +| Yenisei  |  5539|Asia 
 +| Mississippi  |  6275|North America 
 +| Amazon  |  6400|South America 
 +| Paraná  |  4880|South America  |
  
 +\\ 
 +====Community examples====
 +  * [[https://community.easymorph.com/t//675/5|Compare two Excel sheets with EasyMorph]] ([[https://community.easymorph.com/uploads/short-url/xQLWtAogCqcMrglyfXLKmrAF7aR.morph|Project]]; Module: //Main//; Group: //Compare data//; Table: //Mismatching rows//;\\ Action position: //4//)
 +  * [[https://community.easymorph.com/t//1865/4|Dynamical generating of path based on previous step]] ([[https://community.easymorph.com/uploads/short-url/70xVAnShgK4EiXuSa4HgMJtFAM2.morph|Project]]; Module: //Import and send//; Group: //Tab 1//; Table: //Create XML//;\\ Action position: //4//)
 +  * [[https://community.easymorph.com/t//2017/3|Duplicating rows based on a condition]] ([[https://community.easymorph.com/uploads/short-url/blETeOO6qUVzskyO2eYqMiNvjPP.morph|Project]]; Module: //Main//; Group: //Tab 1//; Table: //Table 1 (2)//; Action position: //9//)
  
-**Objective:** Arrange the rivers in alphabetical order+\\  
 +=====Shortcuts===== 
 +Fast ways to create the action:\\
  
-**Transformation parameters:**+  *Right-click on the heading of the column to sort and select "Sort"
 +  *To sort by multiple columns, select the columns included in the sort.  Right-click on one of the selected column headings and select "Sort" Columns will be sorted in left-to-right column order.
  
-  * Column: River 
-  * Sorting order: Ascending 
-   
-**Output table:** 
  
-^  River  ^  Length (km)  ^  Continent  ^ 
-| Amazon  |  6400  |  South America  | 
-| Mississippi  |  6275  |  North America  | 
-| Nile  |  6650  |  Africa  | 
-| Ob  |  5410  |  Asia  | 
-| Paraná  |  4880  |  South America  | 
-| Yangtze  |  6300  |  Asia  | 
-| Yellow River  |  5464  |  Asia  | 
-| Yenisei  |  5539  |  Asia  | 
  
  
transformations/sort.1428695541.txt.gz · Last modified: 2015/04/10 15:52 by elenap

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki