Table of Contents
KEEP MIN/MAX
Category: Transform / Filters
Description
This action keeps (or removes) only rows with values that are the biggest or smallest in a specified column.
Use cases
Use this action to generate datasets of "top N" or "bottom N" (or "top %" or "bottom %") records based on values in a specific column.
Action settings
Setting | Description |
---|---|
Column | Select the column to filter values on. |
Keep or remove? | Select whether keep or remove the highest/lowest values. Options: Keep or Remove. |
Biggest or smallest? | Select whether to keep/remove the largest values, or the smallest. Options: Biggest or Smallest. |
How many (numbers/dates)?* | Select whether to keep/remove a specific number of values (e.g. "3" for the top/bottom three values), or a percentage (e.g. "10" for the top/bottom 10% of values). Options: Count or Percent. |
Inside groups | When checked, the min/max process will operate within groups of values in the column(s) selected (and select the column(s)). |
* Setting can be specified using a parameter.
Remarks
Taking into account ties, the number of rows returned by this action may exceed the "Count" value entered. The "Count" value refers to the number of unique values, not the number of rows.
Examples
Example: Obtain the products with the lowest three prices.
Source table:
Product | Price, USD |
---|---|
A | 12 |
B | 16 |
C | 14 |
D | 13 |
E | 13 |
F | 9 |
Action parameters:
Column is "Price, USD"
"Keep" the "Smallest"
Count is "3"
Result table:
Product | Price, USD |
---|---|
A | 12 |
D | 13 |
E | 13 |
F | 9 |
Although the "Count" value was "3", four rows were returned due to the duplicate value "13" in two rows.
Community examples
- String manipulation (REVERSE) (Project; Module: Main; Group: Tab 1; Table: Using actions; Action position: 5)
- How to process parent-child data structures (Project; Module: Module 1; Group: Tab 1; Table: Longest folder path; Action position: 4)