Working with Filters in Dashboard

Introduction

As a report creator, you can add filters to your dashboard so that consumers can flexibly interact with the dashboard data.

Filters are components to be added to the dashboard to let end-users (viewers) filter down (control/restrict) the data displayed. When interacting with a dashboard filter (selecting operators, filter values...), an additional WHERE condition will be applied to the widgets that use the filter.

Setting up filters in dashboard

To set up filters in dashboard:

  1. In the dashboard, click on Add filter icon on the top right corner, and choose from the five types of filters (Field, Date, Text, Number, True/False).
  2. In this example, let's create a filter named Date from field orders.created_at of Ecommerce Dataset
  3. Map the filter to orders.created_at fields of all widgets.
  4. When a viewer changes the Date filter value, a filtering condition will be applied to all widgets that are mapped to this filter.

filters

Rules on the filter mapping:

  • Field filters will be automatically mapped to the widgets that use the same Dataset
  • Manual-input filters need to be manually mapped to widgets and fields.
  • Filters can only be mapped to the fields of the same data type.

Apply dashboard filters

The Filters pane contains filters that were added to the dashboard by the creators. As a consumer/viewer, you can only interact with the filters to refine the dashboard data but can't add new filters.

Here I'd like to know data of all orders last year, so I simply change the dashboard filter as follows:

filters

Note: Due to the setup, not all widgets are affected by this filter. You can look at the widgets' visuals to find clues on whether the filter condition is being applied to the widget.

Automatic filter suggestions

By default, in dashboards or data explorations, when a user enters a value in a text filter, Holistics will suggest options that match what the user enters.

The suggestions are generated by running SELECT DISTINCT query on the dimension. We fetch 100K distinct values of the field and cache the result, any permission rules for the user would be applied as well.

SELECT DISTINCT(field_name)
FROM dataset.datamodel.table_name
WHERE <permission_rules>

Initially, we show 200 records in the suggestion dropdown. As user types in, we will search on the cached result on our own cache to optimize performance. The cache duration is 8 hours by default.

Other functionalities (coming soon)

  • Enable/disable filter suggestions
  • Set filter suggestion cache

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, next, last X days/months/years.

Filter types

Please follow the links for more details about each type of filter