User Tools

Site Tools


transformations:trimbycondition

This is an old revision of the document!


Trim Table by Condition

This transformation removes the rows above or below the first row where the specific condition is true.

EXAMPLE

Table: The company sales in stores of Montreal and Toronto

Store/ City Jan-15 Feb-15
Store 1-Montreal 30359 35018
Store 2-Montreal 24500 28251
Store 3-Montreal 32721 34300
Total (Montreal) 87580 97569
Store 1-Toronto 29800 33691
Store 2-Toronto 37464 40250
Store 3-Toronto 41238 45390
Total (Toronto) 108502 119331

Objective: Remove the rows with Montreal sales.

Transformation parameters:

  • Condition: [Store/ City]=('Total (Montreal)')
  • Delete rows that are: Above the first match
  • Delete the first matching row too (check the box)

Result:

Store/ City Jan-15 Feb-15
Store 1-Toronto 29800 33691
Store 2-Toronto 37464 40250
Store 3-Toronto 41238 45390
Total (Toronto) 108502 119331
transformations/trimbycondition.1430501372.txt.gz · Last modified: 2015/05/01 17:29 by elenap