Understanding ranking
Video tutorial
Use ranking to create a new column with the rank for each subset of records relating to the same key. Ranking allows you to rank a table based on a specific column. For each subset of records associated with the same key in a table, a sequence number is assigned according to the relative value of a given field. Ranking is used, for example, when trying to identify the first products purchased by each customer, or the most recent product purchased.
How to create a ranking column
1 In Enrichment—Engineering, choose Ranking.
2 In New column name, type a name for the new column.
3 Select a ranking order, Ascending or Descending.
4 To select the key to rank, drag a column from My Data.
5 To select the field to use for ranking, drag another column from the same table, as shown in Figure 3‑19. One table must include both key column and rank field.
Figure 3‑19 Selecting properties for a new ranking field
6 Optionally, to filter the ranked column, drag a segment from either Discrete Values or Scratchpad and drop it in Filter (optional).
7 In cases where two or more records have exactly the same value, select Always increment to ensure that each record is allocated a different rank. If you do not select Always increment, records with the same value have the same rank.
8 Choose Create. The new field appears in the table of rank elements. For example, you obtain 230,466 orders ranked with value 0, corresponding to the first purchases for each customer.
Video tutorial
Creating a ranking