Show Table of Contents
Filter actions send information between worksheets. Typically, a filter action sends information from a selected mark to another sheet showing related information. Behind the scenes, filter actions send data values from the relevant source fields as filters to the target sheet.
For example, in a view showing the sales price of houses, when you select a particular house, a filter action can show all comparable houses in a different view. The source fields for the filter might contain sales price and square footage.
Watch a video to see real-world examples of actions. Filter actions are covered at the 2:20 mark.
To create a filter action:
On a worksheet, select Worksheet > Actions. From a dashboard, select Dashboard > Actions.
In the Actions dialog box, click Add Action and then select Filter.
In the subsequent dialog box specify a name for the Action.
Use a name that defines the action. If you choose to run the action using the menu, the name is the option that shows on the menu. For example, when sending housing information from one sheet to a map, the name could be “Map all comparable houses sold in February” You can use variables in the name that are drawn from the values of the selected field.
Use the drop-down list to select a source sheet or data source. When you select a data source or dashboard sheet you can further refine by selecting the individual sheets you want to launch the action from.
Then select how you want to launch the action. Select one of the following options:
Hover - rest the pointer over a mark in the view to run the action. This option works well for highlight and filter actions within a dashboard.
Select - click on a mark in the view to run the action. This option works well for all types of actions.
Menu -right-click (control-click on Mac) a selected mark in the view and then select an option on a the context menu. This option works well for filter and URL actions.
Use the second drop-down list to select a target sheet. When you select a dashboard sheet you can further refine the target by selecting one or more sheets within the dashboard.
Specify what to do when the select is cleared in the view. You can select from the following options:
Leave the filter - leaves the filter on the target sheets. The target views in the dashboard will show the filtered results.
Show all values - changes the filter to include all values.
Exclude all values - changes the filter to exclude all values. This option is useful when you are building dashboards that only show some sheets if a value in another sheet is selected.
Setup one or more filters to specify the data that you want to show on the target sheets. You can filter on All Fields or define filters on Selected Fields.
If you are defining filters for specific fields click Add Filter.
In the Add Filter dialog box, select source and target data sources and fields. When you run the action from a specific mark on the source sheet, a filter is added to the target sheet that only includes values for the target field that match the source field.
In the comparable houses example, if the Source Field and Target Field are both set to Beds, when you click a sheet link for a house with three bedrooms, the target worksheet shows only three-bedroom houses.
When finished, click OK three times to close all open dialog boxes and return to the view.
If you are connected to a relational data source, you can add sheet links across data sources even if the field names are not exactly the same. For example, if one data source has a Latitude field while another has a Lat field, you can associate the fields using the drop down lists in this dialog box. When using a multidimensional data source, the destination sheet must use the same data source as the source sheet, and the source and target field names must match. In Tableau, multidimensional data sources are supported only in Windows.
The fields available in the Target Field drop-down list are dependent on what you selected as the Source Field. Only fields with the same data type as the source field are available.