When creating a visualization in the visualization canvas, you have the option to add filters via the quick filter bar.
Filtering a visualization will change the data that is in both the chart or map as well as the data table underneath.
When adding multiple column filters to a dataset, column filters are dependent on the results from the other filtered columns. For example, I add a filter for Neighborhood and include only Queen Anne. Then I add a second filter for Police Precinct. The second filter will only show precincts that operate in Queen Anne.
This is also useful when hiding a filter from end users; they will no longer be able to select additional values for data that does not exist in the dataset.
Add a filter
To add a filter to your visualization, select the Add Filter button located in the Filters panel on the right-hand side of the page. This will open up a panel where you can select any column in your dataset and use it as a filter.
You can add as many filters to your visualization as you would like and configure each one in a way that works best.
There are a number of different options for each filter. These options can be accessed by selecting the vertical ellipsis to the right of the column.
Multiple Values vs. Single Value
This setting allows you to specify the number of values that a column can be filtered on. Setting this value to Multiple will allow users to choose a number of different text values, or a range of numerical values.
Setting it to Single value will limit you to a single text or numerical value.
Hidden vs. Interactive
Viewers of your visualization cannot add or remove columns to filter on. In addition, you can choose whether the filter that you have added is usable by the viewer.
When Interactive viewers can apply different values within the filters you have set up. You could also not apply any values to the filter at all, simply adding it for users to filter as they wish. Choosing Hidden will completely remove the filter from the published view.
Different types of filters
The operations you can perform on a filter vary based on the datatype of the column selected.
Text columns values can be pulled in using an autocomplete function. Simply start typing your value and results from the dataset will appear in the filter window.
Selecting the dropdown next to the column name will bring up the list of functions available on text columns: is, is not, starts with, contains, does not contain.
Numerical data can be filtered with a number of different operators. As seen below the full list of available operations are: exclude missing values, is equal to, is not equal to, is less than, is at most, is greater than, is at least, is between, is between and includes.
You can also filter on a location column to show only points that fall within a certain radius. You can search by address to enter an address that would be found on the map, this bar will autocomplete to a list of available addresses.
From there You can use either the slider bar or the text box to choose the radius in miles to filter your results.
Dates can be filtered two different ways, by selecting a distinct range or choosing a relative date period.
This option will allow you to select a distinct inclusive set of dates to filter your dataset. For example, this would be useful if you wanted to look at a single year.
Choosing a relative option will allow you to show a set number of completed periods based on the options you select. You can choose between days, months quarters, or years as well as some preselected options.
We have recently added the ability to also filter on quarters - which are defined by the calendar year and cannot be customized (i.e. Q1 = January-March, Q2 = Aril-June, etc).
The list of preselected options includes Today, Yesterday, This Week, This Month, This Quarter and This Year.
When using relative date filters, only completed time periods would be included. For example, let's say today is April 15, 2019.
- Choosing the Last 5 days will show all data with a date/time between April 10-14th.
- Choosing the Last 5 months will show all data from November 2018 - March 2019.
- Choosing the Last 5 years will show all data from 2014-2018.
- Choosing the Last 5 Quarters will show all Quarters from 2018 as well as Q1, 2019. So in total January 2018 - March 2019.
If you want to just show the last year April 15, 2018 - April 14, 2019, the option to choose would be the Last 365 days.
Q: Can I add multiple filters on the same column?
A: No you can only create filters once on a column. This most commonly comes up with numerical data. For instance, if you want to visualize two different ranges (i.e. 1-10 and 90-100). The best way to approach this is to create a filtered view of your dataset and base your visualization on that view.