TabCharts.com

An on-line library for creating different chart types in Tableau



Histogram






Tableau Canvas Layout:





A typical histogram will have a Bin on the Columns and a Measure on the Rows.

Data Set: World Indicators Dataset



Building a Histogram


Using the World Indicators data:

Create a Bin:

     Right-click on Life Expectancy Female and select "Create" and "Bins...".
     Set the Bin Size to 5, or to the desired size, and click "OK".




     Double-click Number of Records. This will put Number of Records on the Rows (alternatively drag Number of Records to Rows or to the y-axis).
     Double-click Life Expectancy Female (bin). This will put Life Expectancy Female (bin) on Columns (alternatively drag Category to Columns or the x-axis).
Right-click on Null on the X-axis and select "Exclude".

Notice the Marks Card is set to Automatic in the dropdown box. Tableau will automatically create a bar chart based on this data. You can select Bar in the dropdown menu, but in this case it doesn't matter. You should now have a histogram similar to the image below.



Add Region to Rows and to Color on the Marks Card to see a small multiple Histogram showing the distribution of Life Expectancy across the different regions.





Histograms are typically displayed as vertical bars, but if you need to show horizontal bars then simply click the button on the menu to swap Rows and Columns. This will rotate the chart, moving all of the pills on Rows to Columns and all the pills from Columns to Rows.

Related Blog Posts:


How to Make Marginal Histograms and Bar Charts in Tableau by Ryan Sleeper


Return to the TabCharts.com chart gallery