Filter a classic workbook
This page covers filtering in workbooks built with the classic Workbook Editor. To filter a Data App, see Filters and selections.

A workbook has two kinds of filter:
- Workbook filters are the selections a viewer makes in the filter bar, in filter controls on a sheet or by selecting data in a chart. They apply to every chart that can use them.
- Chart filters are set by a designer on one object and add to the workbook filters for that object only. See Filter one chart.
Workbook filters are not shared across browser tabs: each tab keeps its own filter state.
For how semantic layer filters, measure filters and result filters land in the SQL a query runs, see How filters become SQL. For filters built from rules about related records, see Associative filters.
Show the filter bar on a sheet
Section titled “Show the filter bar on a sheet”The filter bar shows the workbook filters and lets viewers add, change and clear them.

Each sheet sets its own filter bar. In the workbook’s Settings, under Filter bar (current sheet), choose:
- Filter bar to show the full bar across the top of the sheet.
- Discreet to show a compact bar. Filter bar position sets it on the Left or the Right.
- None to show no filter bar on the sheet.
Set what viewers can do in the filter bar
Section titled “Set what viewers can do in the filter bar”Select the filter bar in edit mode. Its Settings section holds these options:
| Option | What it does |
|---|---|
| Show add filter button | Lets viewers add filters from the bar. On by default. Its sub-options appear only while it is on. |
| Show associative filtering | Lets viewers add an associative filter. On by default. |
| Set selectable fields | Limits the fields viewers can add. Choose Dimensions, or Pick fields and add the fields. Hide non-selectable fields also hides chips for fields outside that list, which is useful when actions set those filters. |
| Hide Drill-Through Icon | Hides the icon viewers use to change the active field of a drill-through dimension. |
| Hide Clear all button | Hides the button that clears all filters. |
| Hide fields | Keeps the fields you pick off the bar. Their selections still apply. |
| Time travel | Lets viewers query the data as it was at an earlier time. Max time travel days sets how far back, from 0 to 90 days; the default is 1. See Time travel. |
| ✨Insights | Shows Insights, which writes AI insights about the sheet or a selected chart. On by default, and shown only while Insights is on under System settings > AI. Choose the AI provider below the toggle; it receives the chart’s query results. See Insights. |

The Style section sets the bar’s Opacity, from 0% to 100%.
To reuse these settings on other sheets, open Copy settings, select Copy Filter Bar Settings, and choose the sheets that receive a copy.
Add custom buttons to the filter bar
Section titled “Add custom buttons to the filter bar”A custom button in the filter bar runs an action when a viewer selects it.
-
In edit mode, select the filter bar.
-
In Custom Buttons, select + to add a button.
-
Set the button:
- Custom button name identifies the button in actions. Each name must be unique in the filter bar; a duplicate shows Button name must be unique.
- The label below the name is the text on the button: fixed text or a variable.
- Show icon adds an icon, which you choose beside the toggle.

The button appears on the right of the filter bar.

Run an action from a custom button
Section titled “Run an action from a custom button”All custom buttons in the filter bar send their events from the filter bar, so one When block handles them. Compare the Custom button name event parameter with a button’s name to decide what each one does.
-
Open the actions editor and add a When block. Pick Filter Bar as the object.

-
Pick the event, such as On click, and put an If block inside the When block.

-
In the If condition, put a Select event parameter block on one side and pick Custom button name. On the other side, put the button’s name, such as
Smart_Button.
In this example, Smart_Button sets a filter on club_name, and any other button goes to the
sheet Highlights | Sales:

To run the same blocks for every button, test only that Custom button name is not null:

For the filter bar’s events, see When [Filter bar] emits [Event type] do. For building actions, see Action blocks.
Let viewers step back through their filters
Section titled “Let viewers step back through their filters”Filter history adds back and forward arrows to the left of the filter bar, so viewers can return to an earlier set of selections and explore another path from there.

In the workbook’s Settings, under Filtering, turn on Enable filter history. It is off by default.

- Each filter selection a viewer applies adds a step. Each step also records which filters are locked. Pending selections are not recorded.
- Going back and then applying a new selection discards the steps that were ahead.
- Save variables with filter history also records variable values in each step. It is off by default and works only while Enable filter history is on. Variables excluded from bookmarks are not recorded.
- The history lasts only while the workbook is open and is not saved with the workbook or with bookmarks.
Two action blocks work with the history. Create history state adds the current filters as a step, for an action that changes filters, locks or variables. Clear history resets the history to one step holding the current state; it does not clear any filters. Both do nothing unless Enable filter history is on.
Lock a filter
Section titled “Lock a filter”A locked filter keeps its value while viewers explore the rest of the workbook, for example to keep a workbook on one customer, region or reporting period.

A filter can be locked in two ways:
-
By hand. In the workbook’s Settings, under Filtering, turn on Users can lock/unlock fields (off by default). A filter’s menu then has Lock at the bottom.

-
With an action. The Lock filter, Unlock filter and Toggle filter lock blocks each take a field and have a Show toast checkbox that tells the viewer the field was locked or unlocked. They work whether or not Users can lock/unlock fields is on. To set a value and lock it in one step, put a Set filter … to … block before Lock filter.

A locked filter lists only its selected values. Filter objects on the sheet show an Unlock button; in the filter bar it appears only while Users can lock/unlock fields is on. A filter can be locked with no value selected. Locking a filter with pending changes applies them first. Applying a bookmark that saved filters replaces the lock state with the one in the bookmark.
Viewers cannot change a locked filter, but some action blocks can:
- Set filter … to … and Append to filter … values … change a locked filter.
- Set filter … NOT to …, Set filter … from … to … and Set filter … NOT from … to … leave a locked filter unchanged.
- Clear all … filters clears locked filters too.
Keep exactly one value selected
Section titled “Keep exactly one value selected”Always one selected fields, in the workbook’s Settings, keeps a field at exactly one selected value. Add the field and the value it starts on.

Viewers cannot clear the field or select more than one value, and clearing all filters leaves it in place. Use it for a field that sets the context of every chart, such as the account on a single-customer dashboard. It can be combined with a lock. Like a lock, it is not access control.
In the filter bar, the field’s chip shows a check in a circle instead of the remove cross, and Clear all is hidden while the field has a value. You can still keep the field off the bar with Hide fields.

An action can turn this on or off for a field with the Set always one selected for … to … with default value … block.
Add filter controls to a sheet
Section titled “Add filter controls to a sheet”Filter controls on a sheet set the same workbook filters as the filter bar. To add one, select Filters in the editor’s toolbar, then select the control or drag it onto the sheet, and choose its field on the Data tab of its properties panel.
Filter
Section titled “Filter”The filter object lists a field’s values. Measures and progress bars beside the values show how the data is distributed. Quick select, on the Filter tab, applies a selection at once instead of waiting for apply; each selection then runs queries.

Add more than one dimension on the Data tab and the filter becomes a tree, such as Region > Country > City. The first dimension is the top level. The tree holds only combinations that exist in your data.

- Filter mode, in the Limiting section of the Data tab, sets what reaches the data. Filter lowest level, the default, filters only on the lowest level. Filter all levels also filters on the levels above and below the selected value.
- The tree appears both in the list and in the dropdown filter. Selecting a branch selects the values under it, and a branch with only some of its values selected shows a part-ticked box.
- Expand only, on each dimension except the last, makes that level open its branch when selected. That level shows no checkbox and never filters the data.
- Progress bar, on the Style tab, shows bars at every level.
Date picker
Section titled “Date picker”The date picker lets viewers select a date or a range of dates.

Its Calendar style section sets:
- Collapsed or Expanded: whether it first shows the selected dates in one row or the calendars.
- Single day or Range: what viewers can select.
- Start Monday or Start Sunday: the first day of the week.
- The date labels, Time picker, Visible presets and Custom date ranges.
The Color section sets the Hover and Selected colors.

Slider
Section titled “Slider”The slider lets viewers select a range of a numeric or date field.

On the Data tab:
- Dimension is the numeric or date field. Custom min and max sets the range by hand instead of the field’s lowest and highest values.
- Step distance sets the step: a number, or Day, Week, Month or Year for a date field.
- Distribution bars, for numeric fields only, show how a measure is spread over the range. Custom number of bars sets how many.

On the Style tab, Slider sets the labels, Color the Selected and Non-selected bars, and Object the background and border.
Filter one chart
Section titled “Filter one chart”Open the object’s Filter tab. Its sections, from the top:
-
Chart filters add conditions on fields for this object only, on top of the workbook filters. Pick the field, the operator and a fixed value or a variable, then select Apply. They filter rows before the measures are calculated. You can add several conditions and group them; each group’s toggle sets whether its conditions combine with AND or OR.
-
Measure filters apply to one measure, so two measures on the same chart can each count a different slice, such as won deals and deals expected to close this month. The number in brackets beside each measure is how many filters it has applied.
-
Result filters filter on a measure’s result after it is calculated for each combination of dimensions, such as only rows where the number of orders exceeds 2,000.

-
Filter settings changes how workbook filters reach the object:
- Ignore global filters stops workbook filters from applying. Choose All, or Custom and Add fields to ignore only the filters on those fields.
- Show effect of global filters, while filters are ignored, highlights the selected values in the chart instead of removing the others. It works only for filters on the table connected directly to the chart’s dimension.
- Disable interaction/filtering, on objects that offer it, stops viewers selecting data points, including filtering by clicking into the chart. It applies in preview and in the published workbook, not in the editor.
-
Time travel queries the data as it was at a set Date, or a number of Days back with Offset. See Time travel.
In this example, selections on Product Subcategory are ignored and shown as highlighting:


Bind custom SQL parameters
Section titled “Bind custom SQL parameters”When an object uses a semantic layer table defined by custom SQL with parameters, its Data tab lists them under Defined parameters. Bind each one to a variable or a fixed value. For how to declare parameters, see Parameters in a custom SQL query; for variables, see Variables.
