User Tools

Site Tools


transformations:trimbycondition

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 the 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 in Montreal 87580 97569
Store 1-Toronto 29800 33691
Store 2-Toronto 37464 40250
Store 3-Toronto 41238 45390
Total in Toronto 108502 119331

Objective: Remove the rows with Montreal sales.

Transformation parameters:

  • Condition: [Store/ City]=('Total in 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 in Toronto 108502 119331
transformations/trimbycondition.txt · Last modified: 2015/05/01 17:33 by elenap