What’s the difference between the two bar views below?
Both bar graphs were created relatively easily in Tableau. The top one is the default. Notice how all the bars are evenly spaced? Not bad.
But notice the bottom chart. It has the bars clustered within each category. That makes it a little easier to compare within the category without sacrificing the ability to compare across categories. So, how do you get that chart? Turns out there’s a easy trick. Remember this trick and you’ll impress your boss and make your fellow Tableau authors jealous.
Here’s the original view:
What’s the trick?
Replace the second dimension on Columns with the continuous (green) field Index().
All you’ll need to do after making the replacement is to right click the Index field and make a couple of adjustments:
- set Compute Using to whatever dimension is defining color
- uncheck “Show Header”
At this point, you might have a little cleanup
- Depending on the size of the chart, you may want to adjust the size of the bars using the Marks card.
- You’ll notice the faint grid lines in the view above. You can remove them (the vertical ones are especially not needed) from the menu “Format” -> “Lines”
Now you’re done! Just remember the 1 easy trick.