KNOWLEDGE BASE

Create Overlapping Histograms


Published: 14 Jun 2017
Last Modified Date: 19 Jun 2017

Question

How to create overlapping histograms.

Environment

Tableau Desktop 10.0+

Answer

The attached example workbook uses the sample data set Superstore to demonstrate the following directions:
  1. Right-click "Sales" in the data pane and select Create > Bins…
  2. In the "Create Bins" dialog, change the field name or bin size if desired and click OK
    • Note, this method works even if the bins are different sizes.
  3. Right-click "Sales (bin)" in the data pane and select Convert to Continuous.
  4. Repeat steps 1-3 for the "Profit" measure.
  5. Drag "Sales (bin)" and "Profit (bin)" to the Columns shelf.
  6. Drag "Number of Records" to the Rows shelf.
  7. Right-click "Profit (bin)" on the Columns shelf and select Dual Axis.
  8. Right-click either axis in the view (either above or below the bar charts) and select Synchronize Axis.
    • There will be three marks cards: All, Sales (bin), and Profit (bin).
    • Click "All" to select the marks cards that will affect both Sales (bin) and Profit (bin).
  9. Drag "Measure Names" off of the All marks card.
  10. Click Color and in the dropdown menu, slide the Opacity bar to less than 100%.
  11. Click the Sales (bin) marks card
  12. Click Color and select any non-blue color (so that Sales (bin) looks different than Profit (bin)).

Additional Information

The ability to convert dimensions to continuous fields was added in Tableau Desktop 10.0
Did this article resolve the issue?