0
0
Power BIbi_tool~10 mins

Treemap in Power BI - Cell-by-Cell Formula Trace

Choose your learning style9 modes available
Sample Data

Sales data by Category and Subcategory with sales amounts.

CellValue
A1Category
B1Subcategory
C1Sales
A2Fruits
B2Apples
C2100
A3Fruits
B3Bananas
C3150
A4Vegetables
B4Carrots
C480
A5Vegetables
B5Broccoli
C5120
Formula Trace
SUM(Sales) by Category and Subcategory for Treemap size
Step 1: Group data by Category and Subcategory
Step 2: Calculate sum of Sales for each group
Step 3: Calculate total sales for each Category
Step 4: Assign rectangle sizes proportional to sales sums
Cell Reference Map
    A          B          C
1 |Category |Subcategory| Sales |
2 | Fruits  | Apples    |  100  |
3 | Fruits  | Bananas   |  150  |
4 |Vegetables| Carrots  |  80   |
5 |Vegetables| Broccoli |  120  |
The treemap uses Category (A), Subcategory (B), and Sales (C) columns to group and size rectangles.
Result
Treemap Visualization:
+-----------------------------+
| Fruits (250)                |
|  +-----------+------------+ |
|  | Apples(100)| Bananas(150)| |
+-----------------------------+
| Vegetables (200)            |
|  +----------+-------------+ |
|  | Carrots(80)| Broccoli(120)| |
+-----------------------------+
The treemap shows two main rectangles for Fruits and Vegetables sized by total sales. Inside each, smaller rectangles represent subcategories sized by their sales.
Sheet Trace Quiz - 3 Questions
Test your understanding
What determines the size of each rectangle in the treemap?
AThe number of subcategories only
BThe alphabetical order of Categories
CThe sum of Sales for each Category and Subcategory
DThe average sales per subcategory
Key Result
Treemap groups data by category fields and sizes rectangles by sum of a numeric measure.