Tableau Histogram

Tableau Histogram is useful for visualizing 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 Tableau 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 Tableau 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 the Sales Amount bin dimension on the Columns shelf and the SalesAmount measure on the 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 Tableau Histogram data visualization above, the SalesAmount on the Rows shelf is aggregated by Count rather than Sum. To change the aggregate function, click on the down arrow beside the measure and change the Measure value from Count to Sum.

Please refer to create Bins to learn about 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 the 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 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 Tableau Histogram, Please choose Edit Table Calculation..

Edit Table Calculation

Once you choose the Edit Table Calculation.. option, a 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