- Do either of the following:
- On a worksheet, select Worksheet > Actions.
- On a dashboard, select Dashboard > Actions. From the drop-down menu of a dashboard sheet, you can also select Use as Filter. In the Actions dialog box, “generated” appears in the default names of actions created this way.
- In the Actions dialog box, click Add Action, and then select Filter. Or select an existing action, and choose Edit.
- Specify a name for the action.Tip: If you plan to launch an action from a tooltip menu, use a descriptive name so users will understand the action’s purpose. From the menu to the right of the Name box, you can insert variables that are drawn from the values of selected fields(Link opens in a new window).
- Select a source sheet or data source. If you select a data source or dashboard, you can select related sheets you want to launch the action from.
- Specify how the action runs:
Hover - Runs when you mouse over marks in the view.
Select - Runs when you click marks in the view. If you want to avoid running the action when multiple marks are selected, also select Single-select only.
Menu - Runs when you right-click (Windows) or Control-click (macOS) a mark in the view, and then click an option in the tooltip menu.
- Select a target sheet. When you select a dashboard, you can select one or more sheets within it.
- Specify what happens when the selection is cleared in the view:
- Leave the filter - Continues to show filtered results on the target sheets. (In web-authoring mode, this is labeled Keep filtered values.)
- 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’re building dashboards that only show some sheets if a value in another sheet is selected.
- Specify the data that you want to show on the target sheets. You can filter on All Fields or Selected Fields.
- If you chose Selected Fields, do either of the following:
- In Tableau Online or Tableau Server, click a drop-down menu in the Source Field column, and select a field. Then select a target data source and field.
- In Tableau Desktop, 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.Note: Filter actions that depend on a user function, such as USERNAME(), will not work because row-level security restricts access to the data.
In the Add Filter dialog box, the fields available in the Target Field drop-down list are limited to the data type of the Source Field. For example, if you select a text field for the source, only text fields are available as targets.
If you are connected to a relational data source, you can add sheet links across data sources even if the field names don’t match. 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 the Add Filter 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.)