User Tools

Site Tools


transformations:filter

Filter by Condition

This transformation calculates an expression for every row (without adding a new column) and keeps only rows where this expression is true. Other rows are removed.

The expression must be a valid condition – it must return either TRUE or FALSE for any row in the table. If it results in a non-boolean value (i.e. not TRUE or FALSE) for at least one row it will cause a project execution error.

Examples of conditions

[Amount]=0

[Length] * [Width] * [Height] <= 1000

contains([City], 'York')

not isempty([Email])

If no rows satisfy the condition then all rows are removed.

Example of transformation

Source table: The longest rivers in the world

River Length (km) Continent
Nile 6650 Africa
Amazon 6400 South America
Yangtze 6300 Asia
Mississippi 6275 North America
Yenisei 5539 Asia
Yellow River 5464 Asia
Ob 5410 Asia
Paraná 4880 South America

Objective: Find all rivers that are longer than 6000 km

Transformation parameters:

  • Column: Length (km)
  • Expression: [Length (km)] > 6000

Output table:

River Length (km) Continent
Nile 6650 Africa
Amazon 6400 South America
Yangtze 6300 Asia
Mississippi 6275 North America

See also

transformations/filter.txt · Last modified: 2015/06/13 01:20 by dmitry