What Are Set Actions?
Set Actions allow users to dynamically modify the contents of a set based on user interaction, such as clicking or hovering over a section of a visualisation .
A set is a subset of data that is either manually or conditionally created within Tableau. With Set Actions, users can change what is included in a set by selecting data points in a visualization.
How Set Actions Work:
- Creating a Set – First, you define a set based on a specific field (e.g., Product Category).
- Adding a Set Action – You create a set action through clicking on “Worksheet” → “Action” → “Add set action” → “Select Target Set” → “Add values to set”
- Effect on Visualization – When a user clicks or hovers over a data point, the set updates dynamically, impacting calculations, filters, or highlighting specific values.
Example Use Case:
Imagine you have a sales dashboard and want to highlight only selected regions when a user clicks on them. You can create a set of regions and use a set action to update the set based on the user's selection. This dynamically filters or highlights the selected regions across different charts.
What Are Parameter Actions?
Parameter Actions allow users to update the value of a parameter based on their interactions. Parameters in Tableau are user-defined values that can control filters, calculations, reference lines, and more. Unlike sets, which contain multiple values, a parameter stores only a single value at a time.
How Parameter Actions Work:
- Creating a Parameter – You define a parameter that holds a value (e.g., a selected country or sales threshold).
- Adding a Parameter Action – You create a parameter action that updates the parameter based on user selection. “Worksheet” → “Action” → “Add parameter action” → “Select Target Parameter” → “Add values to Parameter”
- Effect on Visualization – When a user interacts with a visualization, the parameter updates dynamically, influencing calculations, filters, or custom reference lines.
Example Use Case:
Suppose you have a chart displaying total sales, and you want users to set a dynamic sales threshold by selecting a specific sales figure. By creating a parameter action, users can click on a bar in the chart to set the threshold dynamically, updating other charts or reference lines accordingly.
Key Differences Between Set Actions and Parameter Actions
When to Use Each?
- Use Set Actions when you need to dynamically include or exclude multiple values from a subset of data, such as highlighting selected categories or filtering multiple values.
- Use Parameter Actions when you need to dynamically update a single value that affects calculations, such as setting a threshold, filtering based on a selected value, or changing aggregation levels. They are also useful for when you want to limit the level of user interaction in specific cases.