Table of content

Treemap in Tableau

The Treemap displays data in nested rectangles. The dimension values define the structure of the Treemap and measure values define the size or color of the individual rectangle. The rectangles are easy to visualize as both the size and shade of the color of the rectangle reflect the value of the measure.

A TreeMap is created using one or more dimension values with one or two measure values.

The following example demonstrates the Treemap

  • I am using a Sample Superstore.xls data source to demonstrate Treemap.
  • Open Tableau and click on Connect to Data.
    connect-to-data-tableau
  • Then the Connect page will open, click on Microsoft Excel.
    click-on-connect-to-data-excel-file-tableau
  • Navigate to the downloaded files, select Sample Superstore.xls excel file, which is a saved excel file, and click on Open.
    connect-sample-superstore-to-tableau
  • You can download a Sample Superstore.xls file from the link: https://chercher.tech/files/
  • Once the data source has been connected, open a new worksheet by clicking on sheet1.
    naviagte-to-sheet1-tableau
  • The Sample Superstore excel file contains the below details.
    sample-superstore-excel-file-tableau
  • We are going to find the size of profits for each Ship mode value.
  • To achieve this, follow the below steps in the Tableau worksheet:
    • Drag and drop the measure value, profit, two times to the Marks Card.
    • Once to the Size shelf and again to the Color shelf.
    • Drag and drop the dimension variable Ship Mode to the Label shelf.
    • Choose the chart type TreeMap from Show Me. Then you will see the following chart.
      tree-map-tableau
    • You can also add the dimension variable Region to the above Treemap chart.
    • Drag and drop, Once to the Color shelf and again to the Label shelf.
    • The chart that appears will show four outer boxes for four regions and then the boxes for ship modes nested inside them.
    • All the different regions will now have different colors.
      tree-map-with-region-tableau
0 results
Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions