Rank
Compare values in your data by ranking rows according to the rules you specify.
Use this when you want to compare values. You can rank rows according to rules you specify, in ascending or descending order.
How the tool handles ties is based on the ranking rules:
Rank. When there are ties, the next item in the sequence starts at the number of items before it. This means there will be a gap in the rankings.
Dense. When there are ties, there are no gaps for the next item in sequence.
Input
The Rank tool requires one data input.
Configuration
Use the following configuration options to configure the Rank tool.
Go to the Pipes module from the side navigation bar.
From the Pipes tab, click an existing pipe to open, or create a new pipe. To create a new pipe, read the Creating a pipe documentation.
In the Pipe builder, add at least one data source to your pipe. For more information on adding a data source, see the Data tool.
Click
+ Tool.
The Tools modal opens where you can add tools, such as the Aggregate tool to your pipe.
In the Tools modal, search for Rank and then click + Add Tool.
Tip
You can also find the Rank tool in the Organize section.
Click the tool node and drag the line to the next tool to connect the tools. If you need to undo the action, click the line and then click Unlink.
In the configuration pane, enter the following information:
Table 87. Rank tool configurationField
Description
Rank type
Select the rank type:
Rank: Ranks your data in order.
Note
When there are ties, the next item in the sequence starts at the number of items before it. This means there will be a gap in the rankings.
Percent: Ranks your data in percentages.
Dense: Ranks your data in order.
Note
When there are ties, the next item in the sequence starts at the next number of items after it. This means there are no gaps for the next item in sequence.
New column name
Enter the name for your new column.
(Optional) Group by
Select the Group by checkbox if you want to group the columns that you want to rank based on the values of an existing column.
Sort by
Select the column in your data set that you want to sort by.
Sort direction
Select the sort direction, ascending or descending.
+ Add order by
Add a new sort condition.