In this article, we will show you, How to Create Cumulative Histogram in Tableau with an example. This is the continuation 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 example
To create a Tableau cumulative histogram, Drag and Drop the Sales Amount from Measures Region to Rows Shelf as shown below. Since it is a Measure value, Sales Amount will be aggregated to default Sum.
Cumulative Histogram in Tableau is all about cumulative frequency of a Histogram, Which is nothing but calculating Running Total. In order 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 as shown below
Now, our data is arranged by the Running total but our intention is to display Tableau Cumulative Histogram and Normal Histogram in One Chart using Dual Axes concept. Here, our Normal Histogram is displaying Percentage of Total but our Cumulative Histogram is displaying Running total. In order to combine them,
- we have to change the Table Calculation of either of them or
- You can add 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 as shown below
Once you select the Edit table Calculation option, the following window will be opened. Please checkmark the Perform Secondary Calculation on the result option. Next, select the secondary calculation Type as Percent of Total as shown below
Once you are done, Total Running Sum of Sales Amount chart is arranged by Running Total and display the percentage of Total. If you observe the Axis of Total Sales Amount and Total Running Sum of SalesAmount closely, they both are displaying the Percentage so, it’s easy to create Dual Axis
To create 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, Please select the Dual Axis option as shown below
Once you select 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)
From the below screenshot you can observe that We assigned 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 in Tableau
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%. In order to make them same, we have to use the Synchronization of 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
From the above screenshot, We successfully created the Tableau Cumulative Histogram and Normal Histogram on Dual Axes
Thank You for Visiting Our Blog