Sign in or start a free trial to avail of this feature.
The Treemap. It’s often used in similar situations to the pie chart. We’ll create both charts, and discuss when to use them, in this lesson.
- A treemap is a series of rectangles, where the size of a field is represented by the area of the rectangle
- There is no numeric axis
Treemaps vs Pie Charts
- A treemap can be used in situations where you might also consider a pie chart
- Generally, a treemap is better when you have a large number of categories
- A treemap uses report space more efficiently
- A treemap always sorts from largest to smallest, a pie chart can be difficult to interpret if not sorted in this way
When to Use Treemaps
- A treemap can work when you have a large number of categories
- It is also effective when you have a small number of categories that make up a large proportion of the total area
- It is not effective when you want to identify specific numbers or make quantitative comparisons between areas
As you may remember from the previous Power BI course, treemaps provide a useful method for comparing the size of different variables.
In this lesson we'll look at treemaps in more detail and discuss some of their advantages over pie charts which you may be tempted to use in similar situations. Let's look at the treemap by analyzing the number of users of the company's software by state.
We'll drag the user's field to the campus followed by state, resize the chart to cover the left half of the canvas, and then change it to a treemap.
As we can see, treemaps represent our data in nested rectangles where the size corresponds to the field in the values well. In our treemap, each rectangle represents a state, and the size is determined by the total number of users in that state.
We can quickly see that New York, New Jersey, Florida, and Pennsylvania, have more users than the other states. Notice that there is no numeric axis, so the only way to find out the actual number of users is by looking at the tool tips.
As such, treemaps are useful for comparing values without diving into specific numbers.
Let's add a field to the details well to break up each square into smaller pieces.
If we add the city field, we see that each state is broken down into smaller squares for each city. Since each state has quite a few cities, this graph is difficult to read.
Let's remove the city field and return the treemap to its original state. Note that treemaps and pie charts are often used in similar situations.
Let's look at a pie chart of the same data.
We'll copy our treemap with Ctrl C, paste it with Ctrl V, move it to the right side of the canvas, and change this new chart to a pie chart.
The number of data points makes the pie chart fairly difficult to interpret. The treemap is a bit more intuitive.
Let's reduce the number of states by adding a slicer for region.
We'll select the Midwest region.
As we can see, both charts are sorted in order of size.
The treemap places the largest state in the top left and the smallest in the bottom right, while the pie slices get smaller as you move clockwise around the pie. However, it is possible to reorder the pie chart.
We'll select the three dots in the corner, and sort the chart by state.
This view actually makes it more difficult to compare size of different slices at a glance. Note that both of these charts have their critics in the world of statistics. They're often used in similar situations, however treemaps have several advantages. For one, the rectangular shape of a treemap uses space more effectively than the circular pie chart.
Also, it's often easier to identify the largest and smallest values in a treemap.
Finally, the treemap labels points more effectively than the pie chart, particularly for small values. Treemaps are often preferable over pie charts when you have a large number of data points, as we saw in this lesson. They're also useful when you have a few large observations that make up a large proportion of the data set. The treemap lets you easily see what proportion of the data is made up by large observations.
However, there are situations where a treemap is not appropriate. They don't work well if you want to identify the numeric values of specific observations.
Treemaps are also not a good choice if you want to compare specific values of different rectangles. If you want to make a measured comparison, another chart, like a bar of column chart, will make more sense.
Generally, treemaps are used where you're interested in comparing the relative size of variables without being too interested in numerical specifics.
Although treemaps and pie charts are used in similar situations, the treemap is generally easier to interpret.
In the next lesson, we'll look at different options for aggregating our data.