Discuss Histograms in Tableau?

A histogram is a chart that displays the shape of a distribution. A histogram looks like a bar chart but groups values for a continuous measure into ranges, or bins.

In Tableau you can create a histogram using Show Me.

  1. Connect to the Sample - Superstore data source.
  2. Drag Quantity to Columns.
  3. Click Show Me on the toolbar, then select the histogram chart type.
  4. The histogram chart type is available in Show Me when the view contains a single measure and no dimensions.
  5. The Quantity measure you placed on the Columns shelf, which had been aggregated as SUM, is replaced by a continuous Quantity (bin) dimension. (The green color of the field on the Columns shelf indicates that the field is continuous.)
  6. The Quantity measure captures the number of items in a particular order. The histogram shows that about 4,800 orders contained two items (the second bar), about 2,400 orders contained 4 items (the third bar), and so on.
  7. Let’s take this view one step further and add Segment to Color to see if we can detect a relationship between the customer segment (consumer, corporate, or home office) and the quantity of items per order.
  8. Drag Segment to Color.
  9. The colors don’t show a clear trend. Let’s show the percentage of each bar that belongs to each segment.
  10. Hold down the Ctrl key and drag the CNT(Quantity) field from the Rows shelf to Label.
  11. Holding down the Ctrl key copies the field to the new location without removing it from the original location.
  12. Right-click (Control-click on a Mac) the CNT(Quantity) field on the Marks card and select Quick Table Calculation > Percent of Total.
  13. Now each colored section of each bar shows its respective percentage of the total quantity.
  14. But we want the percentages to be on a per-bar basis.
  15. Right-click the CNT(Quantity) field on the Marks card again and select Edit Table Calculation.
  16. In the Table Calculation dialog box, change the value of the Compute Using field to Cell. Now we have the view that we want.