Filters are used to "zero-in" on your data's most relevant information to make better visual projections of your research. Filters don't remove any data they, just control what data is displayed at a given time.


Some things to check before starting.

You will need data uploaded to a Tercen project. Also, create a workflow with the data table added and at least one data step attached.

No time to read?

Watch a video of how it's done.

Tip: Open the video in another browser tab beside Tercen. That way, you can pause it and follow along with the instructions.

Applying a filter

Filters are applied in a data step. The Filter Box is part of the control panel of the crosstab projection screen.

This is the Filter Box.

There is a default filter called "Remove NaN" applied as standard. This excludes columns or rows in your data that have no values. (i.e. blank rows or blank columns.)

To make a new filter, drag a Factor over to the filter box.

A box will open, which lets you set the logical rules that will include or exclude what is displayed.

Setting the rules

In Tercen, rules are made to be... um... obeyed.

Setting a rule involves adjusting the filter settings with logical expressions. As you work through the Filter Settings, there are places to make decisions about how the filter selects your data for display.

Name: It is a good idea to change this to something you can recognise more easily later.

AND / OR: More than one rule can be part of a filter. By ticking these boxes, you can control whether a rule must be met by the selection (AND) or can be optional to the selection. (OR)

Not: Selecting this reverses the logic of the rule you have set below. Equals becomes Not Equals etc.

Plus Button: Adds a new rule that follows the current (AND/OR) selection criteria.

List Button: This adds new rule which can have it's own (AND/OR) selection criteria.

Rule Bar

A rule consists of a Factor from the data table to work on. A Qualifier to say how the factors data should be treated, and a Value to use as a parameter for the qualifier to act.

Click the search button bring up a list of the unique qualifiers that are available in your data.

Here I will select Birchpollen

This rule bar selects data where the sample.stimulation field contains the value "Birchpollen."

Note: A filter is created by dragging a factor to the filter box, but rules are not restricted to only that factor. Using the Plus or List buttons will add new rules, but they do not have to be based on the originally dragged factor.

An Example

This filter demonstrates how the settings described above interact with each other.

This filter has multiple rules based on multiple factors. It selects a dataset to display male patients, in an age range, who have been prescribed one of the drug treatments we are interested in analysing.

I have started by giving it a sensible name to know it by.

I have used AND to make compulsory the selection of Male for patient.Sex as well as the selection of patient.Age to be both above 18 and below 65 years of age.

The drug treatments are made optional by using OR. Once our patient matches one of these drugs, he will be included in the dataset.

Note that I have listed three drugs for inclusion, any patient.Drug that matches a drug not listed in the filter (or no drug at all) will be excluded.

Apply a Filter to a different Data Step.

Tercen remembers your filters so you can use them in other data steps.

You may want to use a carefully crafted filter in many places during your data analysis. There is a plus button on the Filter Box that allows you to access every one of them.

Pressing this will list all of the filters and which data step they live in.

Re-using a filter in your new data step is as easy as selecting from this list.

Did this answer your question?