3 Ways to Enhance Tableau Dashboard Interactiveness using Set Actions
Using Tableau Set Actions in Your Work
You may have previously used sets in Tableau to create a subset of your data or to group your data based on some predefined conditions. At the row level, individual records are either in or out of the set. There are two types of sets: fixed and dynamic. In fixed sets, changes in data do not affect the in/out condition of your set. When you select a dimension and use Create > Set, you are essentially creating a fixed set. In a dynamic set, when the data changes, the set may change based on whatever conditions or calculations affect the set.
In this article, we are going to look at examples of set actions in Tableau and discover ways of using this feature to improve interactivity on our everyday Tableau dashboards.
What are Set Actions
Set actions are a feature in Tableau that provide Tableau users more control over interactivity in their dashboard design. This control over interactivity makes it easy to coordinate different actions across multiple views with a single click or selection.
Using Sets to Show a Part to a Whole Relationship
One useful way to use Set Actions is to show a part to whole relationship. If we want to see how a specific Region contributes to Sales in our various Product Sub-Categories, we can use set actions to highlight the contribution.
- In Tableau, connect to the Superstore Sample data Source
- Drag the Region dimension to the Row Shelf and then Sales to Columns
- In a second sheet, bring your Product Sub-categories to the Rows and Sales to Columns
- Create a set using the Region Dimension by right-clicking the Region dimension and selecting Create Set. Name it the Region Set
- In the set pop-up window select any of the Region values and select OK.
- In the view that shows Sales by Product Sub-category, drag the Region set to color
- Now create a dashboard and drag both charts into it
- From your dashboard view, select Dashboard > Actions
- In the pop-up window select Add Action > Change Set Values
- In the pop-up window, set the options as you see in the screenshot below
- Hit Ok. You can now test the Set Actions by clicking on the Region bars on your dashboard.
Using Set actions to swap sheets
Sheet swapping is a useful way to save space on your dashboard. This method of cycling through sheets view can be achieved using a parameter. However, if you are thinking of a more dynamic approach, you can use Set Actions. In the example below we’re going to use the various Segments (i.e. Consumer, Corporate & Home Office) to cycle between various charts
- Build a chart that shows the overall Sales segmented by product Sub-Categories. Name this chart as Consumer Sub-Category
- Build a second chart that shows a map of Sales. Name this Corporate Map
- Create a third view that shows the trend of sales based on the month of the year. Name this chart Home Office Trend
- Right-click on the Segment field and create a set. Select any value within the set. Name the set and select OK.
- Create the calculation below to determine which Segment is displayed when a Set value is chosen
- Create another calculation just as the screenshot below to enable the sheets to be swapped when a value in the set is selected
- Next build a view that would serve as a selector for the various charts we built as shown in
- Create a dashboard and drag the selector sheet to it. Place an empty vertical container next to the selector sheet as shown below
- Open the Dashboard actions menu and select Change Set Values
- Select the options as shown in the screenshot below
- Click on Consumer in the selector sheet. Now go to the chart Consumer Subcategory.
- Drag the Sheet Swapper field we created earlier to the filter shelf and ensure the correct filter is selected
- Repeat step 11 & 12 for Corporate and Home Office. Always ensure you click on them in the Sheet selector first.
- Now drag the sheets Consumer Subcategory, Corporate Map and Home Office individually to the vertical container on the dashboard and each case hide the title
- Now click through the options on your sheet selector to ensure the views are being swapped
Using Set Actions to Drill Down
When working with views that involve a hierarchy or several levels of detail, you can use Set Actions to achieve. In the tutorial below, we will build a hierarchy involving Category, Sub-Category and Product Name.
- Create a hierarchy using Segment, Category and Sub-Category
- Right-click the Segment field and create a set. Leave the values empty
- Name the set Segment Set
- Open the calculation window and input the formula below. Name it First Level and hit OK
- Right-click the First Level field from your data pane and create a set. Name it First Level. Leave the values empty
- Open the calculation window and input the formula below. Name it Second Level and hit OK
- Drag Segment and the First Level and Second Level calculations to Rows and Sales to the Columns shelf
- Name the Sheet Drill Down
- Create a new dashboard and drag the Drill Down Sheet to it
- Select Dashboard Actions and Select Change Set Values and configure the action as shown below for the first hierarchy
- Repeat the process for a second hierarchy as shown below
- Test interactivity by clicking through the Segment, First Level and Second Level on the dashboard
Subscribe to BI Connector blog to learn more on Tableau tips and tricks. Want to visualize OBIEE data in Tableau? Try BI Connector for Tableau free!
Subscribe to BI Connector
Get the latest BI Connector news, articles, and
resources, sent straight to your inbox every month.