How to Sort Stacked Bars With a Selection in Tableau

By: Eric Parker

Eric Parker lives in Seattle and has been teaching Tableau and Alteryx since 2014. He's helped thousands of students solve their most pressing problems. If you have a question, feel free to reach out to him directly via email. You can follow him on LinkedIn or sign up for a Tableau Office Hour to work with him directly!

Stacked bar charts are a brilliant visual for displaying how individual segments contribute to the overall value of a category, and how a category ranks in relation to other categories. Like all data visualizations however, it has some weaknesses.

One of the biggest weaknesses of a stacked bar chart is that it's hard to compare bar segments when they don't have a shared baseline. Comparing the first bar segment is straightforward, but comparing the 3rd or 5th segment is cumbersome.

One cool way you can allow your users to more easily compare bar segments is with dynamic sorting! For example, you can utilize a calculation, set action and custom sort so that the bar sections re-order based on the end-user selection.

Check out this video to learn how! Special shoutout to Andy Kriebel for inspiring this video.

Need help with Tableau? Sign up for an office hour to work with Eric! You can also check out our upcoming classes for a Tableau deep dive!

Related Resources:

Want to keep learning foundational skills in Tableau? Sign up for our weekly newsletter so you never miss new blog posts, videos and events!

How to Publish a Tableau Dashboard

Tableau Dashboard Filter Actions Explained

0