Tableau bar charts come in different forms making them effective in performing a part-to-whole analysis and a ranking Analysis 

When doing analysis, it’s often valuable to see how the individual parts contribute to the whole.  For example, “What’s the breakdown of sales by region,” “What’s the percent of new sales by sales rep this quarter,” or “What percent of the total profit is created by our top 10 or 20 customers?”  In each case, we want to know how a segment contributes to the whole. 

Different Kinds of Tableau Bar Charts

  • Standard Bar Chart
  • Stacked Bar Chart
  • Side-by-Side Bar Chart
  • Bar in Bar Chart

The Standard Bar Chart 

The Tableau bar chart is one we’ve now used frequently.  It’s a great way to show comparisons between each of the parts of a whole. 

  1. Open a new tab and drag Customer Name out to Rows. 
How to Make a Bar Graph in Tableau
  1. Drag Profit out to Columns. 
  1. Click the descending sort icon  
  1. Now, let’s add a Quick Table Calculation.  Hold down Ctrl and drag a new instance of Profit over to the right. 
  1. Click the down arrow, select Quick Table Calculation, then Percent of Total. 
  1. Turn on Labels on the Marks card. 
  1. To add further detail to the viz, let’s now drop that Percent of Total calc onto the Color shelf.  Hold ctrl and drag the calc onto Colors.  You’ll now see your bars go from dark green to red. 
  1. Notice how we can now very quickly see that losses from our least profitable customers cannibalize the gains from some of our best customers. (You will have a lot more customers than shown in the image below. Customers with minimal profits/losses were excluded to fit the ends of the spectrum in one view to be printed here.) 
Tableau Bar Charts

The Tableau Stacked Bar Chart 

This type of visualization depicts items stacked one on top (column) of the other or side-by-side (bar), differentiated by segments on the Color shelf.  Stacked graphs should be used when the sum of the values is as important as the individual items, as stacked graphs enable you to see the totals and the composition of those totals.  However, while it is fairly easy to interpret the values for the first segment in the graph, it can be difficult to judge the exact widths of any subsequent strips, or to compare the widths of two strips. If accuracy or comparisons are of primary importance, then using a different Tableau bar chart might be more advantageous. 

  1. Drag Sales to Rows. 
  1. Drag Segment to Columns. 
  1. Drag Region to the Color shelf. 
  • We now have a Tableau stacked bar chart plotting sales by region within each bar, as well as comparing total sales by region across customer segment. 
  1. Click the flip axis icon at the top to improve readability. Our Tableau bars are now a little too narrow.  To improve formatting further, hover your mouse in between the Customer Segment labels until you get the up/down arrow icon and drag to make the bars wider. 
  1. Notice how you can use the various shelves to get the same effect as you could from Show Me.  It’s beneficial to understand how Show Me creates charts and be able to recreate that using the shelves so that you can customize and control the presentation of your data. 
Tableau Stacked Bar Chart

The Tableau Side-by-Side Bar 

The Tableau side-by-side bar chart overcomes a lot of the limitations of the stacked bar chart and allows you to compare one measure across multiple dimensions or segments at the same time.   

  1. Right click and duplicate the chart we just created into a new tab. 
  1. Flip the axis of your chart so that Customer Segment and Region are on Columns and Sales is on Rows. 
  1. Region should still be on Color, but if it is not, drag Region to Color. 
  1. Now we can compare each region within a particular segment, as well as compare regions across segments.  So we can see, for example, that the Midwest is our best region for Home Office, but that the West is the best for Corporate and Small Business. We notice that Pacific doesn’t do much in sales in any customer segment.  
Tableau Side by Side Bar

Bar in Bar Tableau Chart

A bar in bar tableau chart plots two bars in the same space, one thicker, one thinner.  It’s great for comparing two measures, or comparing one measure against a target.  To create them in Tableau: 

  1. Bring out a dimension and two measures on a new worksheet.  Let’s make it Product Category and Sales and Profit. 
  1. Drag Product Category to the Rows shelf.  Drag your Measures to the Columns shelf. 
  1. Right click on the down arrow on Profit and make it a dual axis. 
Bar in Bar Tableau
  1. Now, right click on the secondary axis (the one along the top of the chart) and select “Synchronize Axis.”  Now, right click again and hide the secondary axis by unchecking “Show Header.” 
  1. Change the circles to bars under the All section of the marks card. 
How to Make Bar in Bar in Tableau
  1. You should now have bars that overlap.  To get the bar in bar Tableau effect, choose the measure that you want to show as the thinner bar – in this case, Profit – and click on the Marks card where it says Sum(Profit). 
  1. Click on the icon for Size and slide the bar down.  The inner bar will thin and now shows you how profit compares to sales. 
  1. Edit the colors to be what you want. 
Create Bar in Bar Chart in Tableau

Quick Tips:

If I wanted to see an end result vs. a starting point and eliminate distracting data, the best chart to use are bullet graphs.

Now that you’ve learned how to create tableau bar charts, it is time to take your Tableau skills to the next level. Enroll in our individual or corporate Tableau training courses and learn advanced skills.