Cumulative Histogram in Tableau

In this article, we will show you how to Create a Cumulative Histogram in Tableau with an example.

It is a follow-up article of Tableau Histogram. So, please read that article to understand the histogram concept. However, if you want to start from here itself, Let us see what we have inside the Tableau report.

We have Sales Amount Bin on Columns shelf, Sum of Sales Amount measure on Rows Shelf and table calculation (Percent of Total) on Sales Amount

Cumulative Histogram in Tableau 0

Cumulative Histogram in Tableau example

To create a Tableau cumulative histogram, Drag and Drop the Sales Amount from Measures Region to Rows Shelf. Since it is a Measure value, the Sales Amount will aggregate to default Sum.

Cumulative Histogram in Tableau 1

Cumulative Histogram in Tableau is all about the cumulative frequency of a Histogram, Which is nothing but calculating Running Total. To calculate the running total, please click on the down arrow beside the Sales Amount measure. Next, select the Quick table Calculation option and then select the Running Total

Cumulative Histogram in Tableau 2

Now, our data will arrange by the Running total, but we intend to display Tableau Cumulative Histogram and Normal Histogram in One Chart using the Dual Axes concept. Here, our Normal Histogram is showing Percentage of Total, but our Cumulative Histogram is displaying Running total. To combine them,

  • we have to change the Table Calculation of either of them or
  • You can add a secondary calculation.

We are using the second option, which is wiser than option 1. Please click on the down arrow beside the Sales Amount measure and select the Edit table Calculation option

Cumulative Histogram in Tableau 3

Once you choose the Edit table Calculation option, the following window will open. Please checkmark the Perform Secondary Calculation on the result option. Next, select the secondary calculation Type as Percent of Total

Cumulative Histogram in Tableau 4

Once you complete, Total Running Sum of Sales Amount chart is arranged by Running Total and displays the Percentage of Total. If you observe the Axis of Total Sales Amount and Total Running Sum of SalesAmount, they both are showing the Percentage so, and it’s easy to create Dual Axis

Cumulative Histogram in Tableau 5

To create a Dual Axes Report, please select the Total Running Sum of Sales Amount Axis. And right-click on it will open the context menu. From that, select the Dual Axis option

Cumulative Histogram in Tableau 6

Once you choose the Dual Axis option following screenshot will be displayed. From the below screenshot you can observe that We have Sales Amount Bin of range 500 on Horizontal Axis and Total Sales Amount, Total Running Sum of Sales Amount in Vertical Axis (which are acting as Dual Axis)

Cumulative Histogram in Tableau 7

From the below screenshot, you can observe that We assigned a bar Chart to Total Sales Amount and Line Chart to Total Running Sum of Sales Amount. Please refer Tableau Dual Axis to understand the Dual Axis report concept

Cumulative Histogram in Tableau 8

From the above screenshot, you can observe that the Tableau Cumulative Histogram looks perfect. But The Maximum Axis values of Total Sales Amount is 55% whereas Total Running Sum of Sales Amount is 100%. To make the same, we have to use the Synchronization of the Axis concept.

Please refer Synchronizing Dual Axes in Tableau section in Tableau Dual Axis to understand the Synchronization of Total Sales Amount and Total Running Sum of Sales axis values

Cumulative Histogram in Tableau 9

From the above screenshot, We successfully created the Tableau Cumulative Histogram and Normal Histogram on Dual Axes