As a report creator, you can add filters to your dashboard so that dashboard consumers can restrict the data displayed. In Holistics, you can set filters at two different levels: dashboard-level, and widget-level.
As mentioned in the Save your Data Exploration docs page, when you save an exploration as a dashboard widget, any filtering condition at the moment will be retained as a widget filter.
This article explains how to work with dashboard filters.
What is a dashboard filter?
A dashboard filter will let the viewers restrict the dashboard’s results to only the data the viewer is interested in. When interacting with a dashboard filter (selecting operators, filter values...), an appropriate WHERE condition will be applied to the widgets that use the filter.
Dashboard filters can apply to all widgets on a dashboard, or to a few widgets based on your settings. Any field in your dataset can become a filter.
The following example creates a filter called
Country and maps the filter with the field of 2 reports
Behind the scene, the filter
Country will be attached to the model field
countries.country_name. Now, when applying a filter with a condition such as
country="Indonesia", the WHERE condition will be applied to that model field (
countries.country_name="Indonesia"). Then, the reports built from that data model like
Registered User will be changed correspondingly, only showing the numbers of Indonesia.
Note: You also don’t necessarily need to add a field to your results to filter on it. For example, you can create a query that filters the Order Country in Indonesia, even though your results only show Register Users and Number of Orders.
In Holistics, filters are divided into two categories:
- Field filters: This category of filter gets information from a model field, and will take on the field's data type (Text, Number, Date, True/False)
- Manual filters: This category of filter is not backed by any model fields, and need to be set up manually. This includes:
Please follow the links to the docs page for detailed information about each filter type.
Structure of a filter
- Operator: specify the comparison type, for example IS, IS NOT...
- Value: the value of the filter. The value you can select/input depends on the data type of the filter.
- Modifier (optional): only available for some of the operators in Date filter (for example,
Mass input of filter values
To filter on a large set of values, you could copy and paste a list of values into the Dashboard filter from a spreadsheet or clipboard.
Filter types that support Mass input: Field filter (coming soon), Text filter, and Number filter.
How to add dashboard filters?
From the dashboard page click Add → Add Filter.
Chose the Filter Type, and map the filter with the report’s fields. When this filter changes these reports will be updated.
For each type of filter, we have separate sections for setting up step-by-step.
Field Filter or Manual Filter?
In general, Field filters are recommended because of its ease to set up, and especially when you want to use Drill-through. Field filter's auto-mapping feature is also convenient when most of your dashboard widgets are created from the same dataset and should be filtered on the same field.
On the other hand, Manual filters are recommended if your dashboard widgets are created from multiple different datasets, or if you want to be extra-careful when setting up filters. However, Manual filters do not have some convenient features like filter value suggestion or automatic mapping.
Dashboard filters & Widget filters
Widget filter is a filtering condition pre-applied to a widget. It will not be overridden by the dashboard filter. Instead, the two filtering conditions will be combined with an AND operator.
To know which conditions are applied on a widget, you can hover on the filter icon next to the widget's name: