Tableau Histogram

Tableau Histogram is useful to visualize the statistical information that organizes within the user-specified range. Although it looks like a Bar chart, Histogram displays data in equal intervals.

This section shows how to Create a Histogram chart with an example. For this demo, we use a custom query against the SQL Server.

SELECT Geo.EnglishCountryRegionName, 
       Geo.StateProvinceName, 
       Geo.City, 
       Prod.EnglishProductName, 
       Prod.Color, 
       Fact.OrderQuantity, 
       Fact.TotalProductCost, 
       Fact.SalesAmount, 
       Fact.TaxAmt, 
       Fact.[Freight]
FROM DimProduct AS Prod 
   INNER JOIN FactInternetSales AS Fact 
      ON Prod.ProductKey = Fact.ProductKey 
   INNER JOIN DimSalesTerritory AS Terry 
      ON Terry.[SalesTerritoryKey] = Fact.[SalesTerritoryKey] 
   INNER JOIN DimGeography AS Geo 
      ON Geo.[SalesTerritoryKey] = Terry.[SalesTerritoryKey]

Steps to create a Tableau Histogram

The following are the steps to create a histogram on the desktop.

Show Me button: To create a histogram, Drag and Drop the Sales Amount from Measures Region to Text filed in Marks card. Next, select the shown option from the Show Me window.

Tableau Histogram 1

Add Sales Bin dimension to create a chart: Once you select the option, a new Bin will create on the Sales Amount. Tableau Histogram will automatically add Sales Amount bin dimension on Columns shelf and SalesAmount measure on Rows Shelf. As you see, the default equally sized bin is 500. But you can change the range distribution of data or adjust the bin size by editing it.

Add Fields or Bins to Columns and Rows Shelf

Change Aggregate Function: From the above Histogram data visualization, see that the SalesAmount on the Rows shelf is aggregated by Count rather than Sum. To change the aggregate function, Please click on the down arrow beside the measure and change the Measure value from Count to Sum.

Please refer to create Bins to learn creating bins and editing them. And also, refer to Connecting to Server and Bar chart and table calculations in Tableau.

Change Measure Aggregate Value to Sum

Once you select the Sum option, Histogram in Tableau will display the Sum of Sales Amount against the Sales Amount Bin.

Tableau Histogram 4

Display Percentage: Our task is to display the Percentage of the Total. To do that, select the Quick table Calculation option from the menu and then choose the Percentage of Total.

Quick Table Calculation percent of Total 5

Once completed, the Tableau histogram will display the Total Percentage of Sales Amount against the SalesAmount Bin.

Tableau Histogram 6

How to edit Table Calculation for Histogram

If you want to edit the table calculation of a Histogram, Please choose Edit Table Calculation..

Edit Table Calculation

Once you choose the Edit Table Calculation.. option, a new window called Table Calculation will open to change the calculation type. From this drop-down list, select the required calculation for the histogram.

Choose Percent of Total 8