Show Table of Contents
Filter actions are a way to send information between worksheets. Typically a filter action is used to send information from a selected mark to another sheet showing related information. For example, when looking at a view showing the sales price of houses, you may want to be able to select a particular house and show all comparable houses in a different view. You could define a filter action to accomplish this task. First you need to decide what comparable means. In this case, say that comparable houses are houses with a similar sale price and square footage. A filter action to show comparable houses can be defined by selecting a destination worksheet and defining filters on sales price and square footage.
Filter actions work by sending the data values of the relevant source fields as filters to the destination sheet. If you launch the filter action described in this example from a house that sold for $450,000, the destination sheet will have a filter to only show houses that sold for the same amount.
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 will be filled in based on 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 a 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 values of the source field. In the comparable houses sheet link example, the Source Field is Beds and the Target Field is Beds. That means when you launch the sheet link for a house that has three bedrooms, the destination worksheet will only show houses that also have three bedrooms.
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. One data source may have a field titled Latitude while another has a Lat field. Using the drop down lists in this dialog box, you can associate the Latitude field to the Lat field. When using a multidimensional data source, the destination sheet must use the same data source as the source sheet. Moreover, the source field names must match the destination field names. 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 can be selected as a destination field.