User Tools

Site Tools


transformations:filterminmax
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


Previous revision
Next revision
transformations:filterminmax [2021/04/26 01:30] craigt
Line 1: Line 1:
 +{{ transformations:FilterMinMaxAction.png}}
 +====== 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 %"/"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)?<sup>*</sup>|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)).|
 +<sup>*</sup> Setting can be specified using a [[:parameters|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=====
 +**Objective:** 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:**
 +^ 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.\\
 +
 +\\ 
 +=====See also=====
 +  * [[transformations:keeptop|Trim table]]
transformations/filterminmax.txt · Last modified: 2023/10/05 00:35 by dmitry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki