A histogram chart is a type of graphical chart that’s used to show the distribution of numerical data.
A histogram chart is very similar to a bar chart, but a histogram usually shows the distribution of a single variable in a specified range of numbers.
For example, suppose you have a dataset of book prices as follows:
Book prices (USD) 3 7 3 8 4 15
The price ranges from $3 to $15. You can create a histogram showing the distribution of book prices in groups of $5:
- The first group is from $0 to less than $5 (3, 3, 4)
- The second group is from $5 to less than $10 (7, 8)
- The third group is from $10 to less than $15 (none)
- The fourth group is from $15 to less than $20 (1)
The histogram would look as follows in Tableau:
As you can see, a histogram chart shows the distribution of the book price into a specified range of values.
This tutorial will help you learn how to create a histogram chart using Tableau.
First, you need to download the sample dataset below:
The dataset contains fictional sales data of an office supplies company that you can use to create a histogram.
Let’s create a histogram of the
Total Sales variable with the following steps:
- Drag the
Total Salesvariable into the Columns shelf
- Open the Show Me pane and click on the histogram icon
The histogram chart icon is located on the second column of the seventh row in the Show Me pane as shown below:
Once you click on the histogram icon, Tableau will plot the
Total Sales(bin) field and the
CNT(Total Sales) field as the graph axis:
You can add more marks to the chart to make it more informative. For example:
- Add the
Cityvariable as a Color mark to the graph
- Add the
Cityvariable again as a Label mark to the graph
- Add the
CNT(Total Sales)as a Label mark to the graph
Now your histogram chart should look as follows:
And that’s how you create a histogram chart with Tableau.
You can also customize the bins that group the variable using the following tutorial:
You can view and download the workbook for this tutorial here:
I hope this tutorial has been useful for you. 🙏