The Sort tool is simple but one of the most used tools. It can be used for a steps in an analytics workflow, but is also often used for exploratory data analysis. It changes the order in which your rows are shown in the dataset by sorting one or many columns either ascending or descending.
The Sort tool only has one required multi-select input.
1
Sort By
Find the relevant columns in the tool configuration and choose if you want to sort the given column ascending (small values at the top) or descending (large values at the top). Note that you can sort by multiple columns simulteanously.
The order in which you set the Sort By selection matters! Select the column sorting in the priority that they should have, i.e. first column selection is sorting before the potential second sorting is applied
Detailed explanation
Each column will have priority according to the order in which it was choosen. For instance, if you first sort an ID column descending and then sort a date column descending, you will get all the largest IDs at the top and only if some rows have the same ID will the one with the latest date by at the top.
Conversely, if you do the reverse, all the most recents rows based on the date column will be at the top and they will be ordered from largest to smallest ID if multiple observations happen on the same date.
Use the Sort tool when you want to change the order in which the rows in your dataset appear. We added a couple of real-life examples for using the Sort tool:
Explore the dataset by a date column using descending sorting to get an overview of the most recent transactions, events, reviews, etc.
Use the Sort tool in combination with the Unique tool to get the maximum value for each of your rows. Sort by some relevant ID (ascending) and the value/date field (descending). Add a Unique tool afterwards and make the dataset unique by the relevant ID you used before. Now you have the largest value or most recent date for each of your rows
Get the transactions with the largest revenue amounts at the top of the dataset