The Filter Tool can be connected to one source tool and will output a table containing rows from that source tool that meet a particular criteria. For example, if you have a CSV file containing addresses from various countries around the world and you want to see only the rows where the "Country" column contains the value "Italy", you can connect a Filter Tool and configure it like this:
Here we have set the Column to "Country", which is one of the columns in the connected source tool and we've left the Compare Type on "Equals". We have then set the Compare Value to "Enter a value..." and have typed "Italy" into the Compare Value text box. When we hit OK, the settings are updated and the Filter Tool results (shown in the results area on the bottom half of the screen) will contain only the rows with a Country value of "Italy".
The Compare Type setting has a range of filtering functions. Here are the different compares types that are available and a brief explanation of what they do:
- This Month
This compare type will filter out rows where the Compare Column has a date value in the current month. - Last Month
This is similar to the above compare type except for that it filters out rows where the Compare Column has a date value that is in the previous month. - Last 90 Days
This tells the filter tool to return results in the Compare Column that contains dates that were in the last 90 days. This does not include today's date. - Next Month
The results that are filtered out in the Compare Column will have a date value that is in the month following the current month. - Next 90 Days
This compare type will filter out rows in the Compare Column where the date value occurs in the next 90 days. This compare type does include today's date. - Equals
As in the above example, this returns rows where the Compare Column value is the same as a value that we've specified. - Not Equals
The opposite of Equals, the filter tool will return rows where the Compare Column value is anything other than the value we've specified. - Greater Than or Equal To
Tells the filter tool to return rows where the Compare Column is the same as or more than the value we've specified. For text columns this means values that come after the value we've specified in the alphabet. For example, "Zara" would be greater than "Abbey" and "Brittney" would be greater than "Brian". For date or time columns greater than means after. So "03/01/13" would be greater than "04/09/12". - Greater Than
Similar to "Greater Than or Equal To" but does not return rows where the Compare Column value is equal to the one we've specified. - Less Than or Equal To
Tells the filter tool to return rows where the Compare Column is the same as or less than the value we've specified. For text columns this means values that come before the value we've specified in the alphabet. For example, "Abbey" would be less than "Zara" and "Brian" would be less than "Brittney". For date or time columns, less than means before. So "04/09/12" would be less than "03/01/13". - Less Than
Similar to "Less Than or Equal To" but does not return rows where the Compare Column value is equal to the one we've specified. - Starts With
Tells the filter tool to return rows where the Compare Column value begins with a certain value. For example, filtering for rows where the "Name" column starts with "Bri" would return rows where the name was "Brittney", "Brian" and "Brin". - Contains
Tells the filter tool to return rows where the Compare Column value has a particular value somewhere within it. For example, filtering for rows where the "Job Title" column contains "VP" would return rows with a Job Title of "Senior VP of Sales", "SVP Sales", "VP Engineering" and so on. - Does Not Contain
The opposite of the "Contains" compare type. Returns rows where the Compare Column value does not have the specified value anywhere within it. - Ends With
Tells the filter tool to return rows where the Compare Column value finishes with the specified value. For example, filtering for rows where a "Name" column ends with " MD" will return rows where the last part of the name column is " MD". - Is Empty
Tells the filter tool to return rows where the Compare Column contains no value at all. If this Compare Type is selected, the Compare Value setting will disappear because it is not relevant. - Is Not Empty
The opposite of Is Empty, tells the filter tool to return rows where the Compare Column contains any value at all, and leave out the ones that are empty. If this Compare Type is selected, the Compare Value setting will disappear because it is not relevant.
The Compare Value setting defaults to "Enter a value..." and provides a text box into which you can type a value. Alternatively, you may use a different column from the source table as the value to compare against. For example, if you had a list of departments and wanted to filter for departments where the "Income" column was Less Than the "Expenditure" column, this can be done by changing the Compare Value setting from "Enter a value..." to "Expenditure".
The Case Sensitive tickbox tells the filter tool whether the upper and lower case letters in the Compare Value setting are significant. For example, if you are filtering for "Country" equals "Italy", leaving the Case Sensitive tickbox unticked will mean that rows with a value of "italy", "ITALY" and iTaLy" will be considered a match and will be returned. If you tick the Case Sensitive tick box then only rows with a country value of "Italy" will be returned.