About: This article introduces the Rank node, a Compile node within Construct.
Location: Node panel
Table of Contents
Feature Overview
The Rank node creates a new column that assigns a rank to each record based on a defined ranking criteria. Users have the option of selecting any of the Input Columns into the Group By or Rank By sections.
Group By
This is an optional field that can be left blank. However, it can also be used to create sub-groups in which the ranking will be applied to each group independently of the records in the other groups. In the example above, the field Gender is used as a Group By criteria. So for each category of Gender in the dataset, there will be a rank of 1 through the number of records within that category.
Rank By
Rank By defines which field is used to base the sort and rank operations on. If no Group By is specified, the ranking is created for the entire population. Only one variable may be chosen to rank by, however multiple variables can be added to the Group By. If values within the Rank By field are null, they are excluded from the rank. If duplicate values exist, Construct will rank them all based on the original order they appear in the dataset, unless it is specified to use the same rank for ties which can be done using the check box. The Rank order can also be defined as either Ascending or Descending.
The New Rank Column Name field allows the user to name the new column that will contain the ranked value. The default value for the column name is ChosenRankByVariable_Rank.
Create Index
If neither the Rank By nor the Group By fields are populated, every record will be assigned a rank based on their position in the dataset starting with 1. In other words, this creates a row count.
Video Tutorial
Related Articles
Comments
0 comments
Article is closed for comments.