In this post we’ll use the new parameter action functionality in Tableau to create an interactive stacked bar chart. When we select a dimension from the viz, we can drill down into a sub-dimension. Parameter actions are new to Tableau as of version 2019.2. In the video we use an NBA data set which you can download in a workbook if you visit my Tableau Public viz.
This neat little trick relies upon the creation of a parameter named [Team Name Parameter] and two dimensions.
- Dimension #1 is the [Team Name]
- Dimension #2 is the [Player Name]
There is an implied hierarchical relationship between [Team Name] and [Player Name] as teams are naturally comprised of players.
We will also create a calculated field named [Player Drill] that is defined as such:
When we place the [Player Drill] calculated field on color on the marks card and setup our parameter actions (watch the video for instruction), the user selection of a [Team Name] on the bar chart will feed the [Team Name Parameter]. This causes all of the players on the selected team to be displayed with their respective breakdown of points scored.
Bonus: There is a FIXED LOD lesson in this video as well as a Star Wars reference which I’m sure you’ll have no issue finding. Here’s a hint:
It’s really not complicated so don’t let all the words here confuse you. Just watch the video and do some great things with your data! Interact with the viz below:
As always, If you find this type of instruction valuable make sure to subscribe to my Youtube channel.
All views and opinions are solely my own and do NOT necessarily reflect those of my employer.
This video was definitely inspired by Kevin Flerlage who has a great blog post on the uses of parameter actions in Tableau. Check it out here.