Here is a summary of the filter functions available in Oasis to build a model.
- Row filtering
- Select specific values to filter
- Filter content based on
- a cell value
- a specific value
- relative to another column
- In all cases, filter operations includes:
- equal, not equal, greater than, less than, greater than or equal, less than or equal
- for strings, operations can include contains, starts with, ends with, of the inverse of these.
- Row filter based on a regular expression
- Column filter (and re-order)
To illustrate some of these features, we can start with a table with fairly random content:
This table contains two column each of text, number, percent, currency, color and date.
Lets start by creating a model that separates out columns by type. For this we’ll create six filter operations where specific columns have been selected:
The network diagram on the left shows the model, where separate filter operations are executed on the source table. One is highlighted that filters just on the two color columns.
This filter is easy to setup. When creating (or editing) the operation, we just select the columns we want to use.
To add a filter step, right click on a cell – say ‘Deep Pink’ – and a context menu shows that has all the available model functions. We navigate with the mouse to the operation we want and click to select it.
This results in a new step added to the model.
Note that this is not an alphabetical sort. This is a color column and the data saved for the color ‘Deep Pink’ is ‘#FF1493
‘. The table is filtered on this basis.
Filtering based on relative values between columns is also possible. For example let’s use the currency columns:
We can filter to rows where Currency is less than Currency 2:
After selecting the other column (Currency 2) the model is updated with a new step:
You can see that Currency is less that Currency 2 in all rows.
More complex text filtering is possible when regular expressions are used. For example starting with the text columns:
If we then right click on a column to select Expression
A small popup appears inviting input of a regular expression.
Let’s just enter ‘pp’ and click the green tick. A new model step is added:
Notice that the first column is filtered on values that just contain ‘pp’.
The blue ‘i’ button in the regular expression popup provides an information sheet explaining the basis of a regular expression, which essentially allows for powerful text pattern matching.
To summarize, many options are available to quickly setup complex filtering operations. For even more advanced filtering, use of calculated columns is needed, then use of a filter on the output of the calculated column. We’ll cover this in another post.
This post also shows how easy it is to create complex information models very quickly.