top of page
anitakhatri31

Creating a Histogram chart in Tableau

Histogram:

Histograms are used to display and analyze the distribution of data. It helps users to understand how data is distributed including where the frequency of the data is high or low. It looks like a bar chart but groups the measure values into bins.


How to create Histogram chart:

The data source referred here is ‘Sample – Superstore’ from Kaggle. Here we will analyze how the quantity is distributed to see how many quantities were ordered. In Tableau we can create histogram chart using ‘Show Me’.

1.       After connecting ‘Sample – Superstore’ data source to the Tableau, drag and drop the [Quantity] in the Rows.

 

Image by Author

 

2.       Using ‘Show me’, Click on the histogram chart (which becomes available as soon as you drag a measure into the Rows or Columns).

 

Image by author

 

 

The histogram chart is created as shown above, showing the vertical bars. The measure [Quantity] dropped in the Rows has been changed from SUM(Quantity) to CNT(Quantity) and Quantity (bin) has been created in the Columns.

 

3.   The [Quantity] bin size is a decimal number and so the bars are not aligned with the Quantity (bin) markings. In the data pane, right click on the Quantity (bin), select ‘Edit’ and change the decimal number (1.77) to whole number (1) as shown below.

 

Image by author

 

When bin size is changed to 1, the vertical bar gets aligned properly as shown below.

 

Image by author

This distribution of data in the chart shows around 900 orders contains 1 quantity, around 2400 orders contains 2 quantities and so on. The highest number of orders contains 3 quantities and lowest number of orders contains 12 quantities.

 

Conclusion:

Use histogram chart when you visually want to analyze the distribution of single continuous measure in the data allowing you to see patterns of frequency, to see how values are spread among the bins and to understand how frequently values fall within the specific range of numerical dataset.

 

Thank you for reading.

 

 

29 views

Recent Posts

See All
bottom of page