You can add a filter button in Tableau by creating a parameter and then using it to control the filter.
Here are the steps:
- Create a Parameter: In the Data pane, right-click on a blank space and select Create Parameter.
- Name and Configure: Give the parameter a meaningful name. Set the Data type to the type of data you want to filter (e.g., string, integer, date). Choose your Allowable values (e.g., list, range, etc.).
- Add a Filter: In the Filters pane, drag the field you want to filter onto the Filters shelf.
- Connect Parameter and Filter: On the Filter card, click the drop-down arrow next to the field, and select Show Parameter Control.
- Customize Button: You can customize the parameter control to look like a button. Change the title, choose a different button style, and adjust the layout as needed.
Example:
Let's say you want to filter your data by Region.
- You would create a parameter called "Region" with a list of values (e.g., "North", "South", "East", "West").
- You would then add a Region filter to the Filters shelf.
- You would connect the Region parameter to the filter by selecting Show Parameter Control on the Region filter card.
Now, you'll have a button that controls the filter. Clicking the button will change the filter to the selected value, updating your visualizations accordingly.