Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Filter Actions in Tableau: Show Only Selected Fields

· 7 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To pass only the fields a user selects into a Tableau filter action, you build the filter list from the selected field values themselves rather than from every dimension on the sheet. In practice you do this by creating a parameter that holds the selected field name, then writing a calculation that maps each row to a single "filter key" and driving the action against that key. There is no built-in switch inside the Filter Action dialog that says "use selected fields only" — the selection is always defined by the fields you mark as source fields, so the work is mostly about controlling which fields those are and how their values are read downstream.

What You'll Need

  • Tableau Desktop (the field-selection technique lives in worksheet editing; Tableau Cloud and Server let you use existing actions but not create this logic).
  • Two worksheets: a source sheet the user clicks, and a target sheet that responds.
  • A data source with a clear, consistent set of fields you want to pass — ideally one dimension per row that describes a category (for example a Field Name column and a Field Value column).
  • Optional but useful: a second dimension holding the field label, so the target sheet can decode what was selected.

Step-by-Step

  1. Decide what "selected fields" means on your sheet. There are two common interpretations. The first is that the user selects rows on a sheet that lists field names, and only those fields should filter the target. The second is that the user selects one mark and the action should pass whichever field names are attached to that mark. Write down which one you need before you start, because the setup differs.
  2. Build the source view. Place the field-name dimension on Rows and the measure or value on Columns. If you want a picker list, a simple text table with one row per field is easiest to click and easiest to reason about.
  3. Create a parameter of type String if you need a manual pick. Right-click in the Data pane, choose Create Parameter, name it something like Selected Field, and set the allowable values to List, populated with your field names. Menus and dialog labels can differ slightly between Tableau versions, so look for the same options under whatever heading your version uses.
  4. Write the filter-key calculation. The simplest version returns the selected value as a single text string: IF [Selected Field] = 'Region' THEN [Region] ELSEIF [Selected Field] = 'Category' THEN [Category] END. Drag this calculation onto the Filter shelf on the target sheet only if you are using the parameter path; otherwise leave it as a plain field used by the action.
  5. Add the field-name dimension as a filter rather than relying on field order. Drag the field-name dimension onto Filters and select the fields you intend to be passable. This is the closest thing to "selected fields only" — anything you leave out of this filter list cannot travel through the action.
  6. Create the filter action. Go to Worksheet > Actions > Add Action > Filter. Choose the source sheet and the target sheet, then under Target Filters map the field-name dimension and the measure or value field to the matching fields on the target. Choose which of the three clear-behaviour options you want so the target resets predictably when the user clicks empty space or deselects.
  7. Set the source fields deliberately. In the action's Source Fields area, remove every field you do not want to travel. This list is where most people lose control: Tableau pre-checks a handful of fields, and anything left checked becomes a permanent part of the filter condition. If you want the action to key only on the field-name dimension, uncheck the rest.
  8. Test the selection behaviour. Ctrl-click (Cmd-click on Mac) several rows to make a multi-selection. Watch whether the target sheet updates to the union of the selected fields or only the last-clicked one. If only one field passes, the source fields are probably too narrow — the action needs a field whose values differ across the selected marks.
  9. Test deselection. Click a blank area of the source view. With "Show all values" the target returns to everything; with "Leave the filter" the target keeps the last state. Pick the one that matches the story and note it in the dashboard's description so others know.
  10. Add a visible cue. Put a text object on the dashboard that names the currently selected field. A simple calculated field referring to the parameter, displayed in a sheet title or text box, stops viewers from wondering why the target sheet changed.

Common Mistakes

Leaving extra source fields checked. The Filter Action dialog quietly pre-selects fields, and each checked field adds an AND condition. A target that should respond to one field can end up requiring two dimensions to match exactly, which produces a blank target.

Expecting the action to read the parameter automatically. Parameter values do not flow through a filter action by default. You have to either reference the parameter inside a calculated field that is mapped in the action, or drive the change through a sheet action on the parameter — the action itself just passes field values.

Filtering the source view too aggressively. If you exclude the unselected fields from the source sheet, users can never click them, and multi-select picks nothing. Keep all clickable options visible on the source and filter only the target.

Assuming multi-select union is automatic. A filter action passes the values of the selected marks. If your field names sit on a different level of detail than the marks the user clicks, the values may collapse to one. Check the level of detail on the source sheet before blaming the action.

Forgetting the dashboard scope. Actions created on a worksheet behave differently on a dashboard when sheets are used as filters or when floating containers cover the view. Recreate or confirm the action from the dashboard's Actions menu after assembling the layout.

Tips

Name your field-name dimension something explicit, such as Field Name, and keep its values short and identical to the target's field names. Typos in that dimension are the single most common cause of empty targets.

Use a "Clear Filter" button built as a parameter action or a reset button that sets the selection back to a default field. It keeps dashboards usable without explanation.

If you only ever need two or three selectable fields, skip the general technique and build one action per field. Three simple actions are easier to debug than one clever action with a large field list.

Document which source fields are checked in a comment on the dashboard or a text box in the corner. It saves the next editor from guessing.

Troubleshooting

The target goes blank. Open the action and check Source Fields and Target Filters together. Usually a field is checked that has no matching value on the target, or the field-name dimension has a stray space or capitalisation mismatch.

The target never changes. Confirm the action is enabled for the dashboard, not just the worksheet, and that the target sheet is actually on the dashboard. A filter action cannot affect a sheet the user cannot see.

Only one field passes on a multi-select. Check the source sheet's level of detail and whether the marks are at line level. If each mark is a single row, each selected row does carry its own field name, so the issue is usually a second checked field creating an impossible AND condition.

Selection clears immediately. A "Clear the filter" setting on selection or an overlapping floating object intercepting clicks is the likely cause. Move the object or change the clear behaviour.

If that did not work, rebuild the action from scratch after removing all but the one field-name dimension from Source Fields, and add fields back one at a time, testing after each addition. That isolates which mapping breaks the target.

Frequently Asked Questions

Can a filter action pass only the fields visible on the sheet?

No — the action passes the fields you map in the dialog. You control the set by removing fields from Source Fields and by limiting the target filters, not by what is visible.

Does a filter action work with a parameter selection?

Not directly. Parameters are not field values, so map a calculated field that reads the parameter and use that calculation as the source field.

Can I use this on Tableau Public dashboards?

You can use actions that already exist in a published dashboard, but building the calculated field and action mapping requires Tableau Desktop.

Why does my target filter to nothing when I select two marks?

Because both selected marks must satisfy the checked source fields at once. Remove the extra checked fields so only the field-name dimension is passed.

Is there a limit to how many fields one action can reference?

There is no documented numeric limit, but every extra field adds an AND condition and makes the action harder to predict, so keep it to the fields you truly need.