Reports can have filters that constrain the data that is shown on screen. You can for example constrain time series data with a filter to show only data for a certain period of time.
Multiple filters can be applied at the same time. The report will indicate when filters are applied and you can inspect and adjust them to control the data on screen.
Filters can be recalculated without going back to the server for new data if the report uses data from datasets that have been loaded into the browser’s database. This will make filtering virtually instantaneous and is good for interactive and explorative reports.
The report will have to call the server to refresh data if it uses remote datasets.
Filters are controlled from the report’s sidebar panel. To access filters, click on the menu in the top right corner of the user interface. Click on the funnel icon to access filters.
Filters show up at the top of the report in addition to the sidebar menu.
Adding a new filter¶
To add a new filter, click on the plus sign . The filter builder will be displayed.
Filters are defined by selecting one or more columns to filter on. All selected columns must be of the same type since the filter will display differently depending on the type of columns selected.
You will have to provide a name for the filter which will be used as the label in the sidebar.
Optionally, provide a variable name. Variables are accessible from code and allow you to build dynamic reports based on the filter value.
Setting default filter values¶
The users of the report can use the filters and adjust the default settings. These changes will not be saved and will reset the next time the report is shown.
The default values are set when the report is published. Make sure that the report is set to the correct filter values before you publish it.
Filters will appear differently depending on the column types selected.
Using date filters¶
The date filter widget will be shown when you create a filter on a date column. You can use both relative and absolute date ranges.
Relative date ranges are useful if you are building a report that will be delivered on a schedule since you can configure the date ranges to track a time window such as “last two weeks” where the actual dates will adjust based on when the report is displayed.
Using text filters¶
Text filters will show a text box where you can enter free-form text. The changes are reflected in the report after a short delay to prevent queries from being issued with every keystroke.
Using boolean filters¶
Boolean filters appear as checkboxes that can be checked or unchecked.
Using numerical filters¶
Filters on numbers appear similar to text filters but are constrained to numerical input.
Dashboards support quick filtering by clicking on report elements. You can apply a filter by clicking on a table row or an element in a chart.
Enabling interactive filters
Visualizations are not clickable by default. To enable interactive filtering, open the data studio and select Enable interactive filters in the right panel.
The report will indicate when filters are active. Delete filter by clicking on the indicator icon.
Accessing filters from code¶
You can access filters by assigning variables to them. Variables are reactive and changes to the filter settings will trigger any code making references to them.
Filter variables provide objects with