Tutorial Gateway

  • C
  • C#
  • Python
  • SQL
  • Java
  • JS
  • BI Tools
    • Informatica
    • Talend
    • Tableau
    • Power BI
    • SSIS
    • SSRS
    • SSAS
    • MDX
    • R Tutorial
    • Alteryx
    • QlikView
  • More
    • C Programs
    • C++ Programs
    • Go Programs
    • Python Programs
    • Java Programs
  • MySQL

Tableau Treemap

Tableau Treemap is used to represent the data in Rectangle Boxes. We can determine each rectangle box using any of our Dimension members and the box size by Measure value. Treemaps in Tableau are very useful to display the most massive data set information in a small data region. In this article, we will show you how to Create Tableau Treemap. The SQL Query for this Tableau Tree map is

-- Query for Tableau Tree Map
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]

First Approach to Create Tableau Treemap

In this example, we create a Treemap for State dimension against the Sales Amount size. First, Drag and Drop the State Dimension from Dimension Region to Text Field in Marks Shelf

Tableau Treemap 12

Now you can see the available State names in Tableau report

Tableau Treemap 21

Next, Drag and Drop the Sales from Measures Region to Size Field in Marks Shelf.

Tableau Treemap 22

By default, Tableau Desktop is displaying TreeMap with State Name as rectangle Text filed and Sum of Sales Amount as the Box size. As you can observe that Box Size of a California State is larger than the remaining states because the Sales Amount is higher than other states.

Tableau Treemap 3

Let us add color to the Tableau Treemap by dragging the Calculated field Profit to the Colors field in Marks Shelf

Tableau Treemap 4

Once you completed, the following TreeMap screenshot will be displayed. State name Box with Maximum Sales will fill with Dark Green and Least Sales Amount with light green

Tableau Treemap 5

Let us add SalesAmount and Profit values to the Text field as well. By this, you can see the State name along with the SalesAmount and Profit. To do this, Please drag the Sales and Profit from Measures region to Text field present in Marks Shelf

Tableau Treemap 6

Tableau Treemap text format

To format the Tableau Treemap Data Labels, Please click on the Text field inside the Marks Shelf to open the below shown window. For now, we are doing basic formatting so, click on the … the button beside the text

Tableau Treemap 7

Here, we added extra text Sales, Profit beside the < SUM(SalesAmount) > and < SUM(Profit) > and also changed the font style to Lucida Sans

Tableau Treemap 8

See the Formatted Text in the Tableau Treemap

Tableau Treemap 9

Second approach to create a Treemap

Please press and hold the control key and then select the Dimension (s), Measure(s) from the respective region and select the Tableau Treemap from the Show Me window

Tableau Treemap 1

Once completed, the desktop will create a Treemap for you.

Tableau Treemap 2

Filed Under: Tableau

  • Download and Install Tableau
  • Tableau Start Page
  • Tableau Show Me
  • Connect to MS Analysis Services
  • Connecting Tableau to SQL
  • Tableau Connect to Text File
  • Tableau Connect to Excel File
  • Hierarchies in Tableau
  • Tableau Bins
  • Tableau Parameters
  • Combined Tableau Sets
  • Tableau Set
  • How to Edit Tableau Group
  • Tableau Group
  • Tableau Grouping
  • Tableau First Report
  • Data Labels in Tableau Reports
  • Format Tableau Chart Title
  • Create Folders in Tableau
  • Tableau Sort
  • Add Totals in Tableau
  • How to Join Data in Tableau
  • Tableau Data Blending
  • Tableau Table Report
  • Tableau Crosstab Report
  • Tableau Annotations
  • Tableau Charts
  • Tableau Area Chart
  • Tableau Bar chart
  • Tableau Box Plot
  • Tableau Bubble Chart
  • Tableau Bullet Graph
  • Tableau Bump Chart
  • Tableau Circle Views
  • Tableau Dual Combination Chart
  • Tableau Dual Lines Chart
  • Tableau Funnel Chart
  • Tableau Traditional Funnel Chart
  • Tableau Gantt Chart
  • Tableau Grouped Bar Chart
  • Tableau Heat Map
  • Tableau Highlight Table
  • Tableau Histogram
  • Tableau Cumulative Histogram
  • Tableau Line Chart
  • Tableau Lollipop Chart
  • Tableau Pareto Chart
  • Tableau Pie Chart
  • Tableau Scatter Plot
  • Tableau Stacked Bar Chart
  • Tableau Text Label
  • Tableau Treemap
  • Tableau Word Cloud
  • Tableau Waterfall Chart
  • Tableau Individual Axis
  • Tableau Dual Axis
  • Tableau Blended Axis
  • Tableau Add Reference Lines
  • Tableau Add Reference Bands
  • Add Reference Distributions
  • Tableau Maps
  • How to Create a Map in Tableau
  • Use Google Maps in Tableau
  • Mapbox Maps as a Background
  • WMS Server Map as Background
  • Create a Tableau Dashboard
  • Format Dashboard Layout
  • Create Dashboard Device Prev
  • Tableau Dashboard Objects
  • Create a Tableau Story
  • Tableau Filters
  • Tableau Filters on Dimensions
  • Tableau Filters on Measures
  • Tableau Extract Filters
  • Tableau Dashboard Filters
  • Tableau Data Source Filters
  • Tableau Slicing Filters
  • Tableau Quick Filters
  • Tableau Context Filters
  • Tableau Top Filters
  • Tableau Table Calculations
  • Tableau Calculated Fields
  • Tableau Running Total
  • Tableau Rank Calculation Basic
  • Tableau Rank advanced calculate
  • Tableau Aggregate Functions
  • Tableau Conversion Functions
  • Tableau Case Function
  • Tableau Date Functions
  • Tableau If Function
  • Tableau Logical Functions
  • Tableau Math Functions
  • Tableau String Functions
  • Tableau Table Functions

Copyright © 2021· All Rights Reserved by Suresh.
About | Contact | Privacy Policy