Home Power BI Using Tree Map as legend on a page in Power BI

Using Tree Map as legend on a page in Power BI

by Prathy Kamasani
USING TREE MAP AS LEGEND ON A PAGE in Power BI

I recently worked on two projects where the client wanted to show multiple metrics sliced by the same categorical data. For example, seeing how various metrics are performing over different regions or different product groups. A use case like this can be achieved in many ways; probably the best approach is to use small multiples functionality or to keep it simple, five same visuals with different metrics.

Let’s look into it with energy consumption data. Here, I want to show metrics 1 to 5 on different income levels over the years.

Five different visuals

When you know exactly how many categories you have in the requirement and how you want to display your data, then going for a certain number of visuals is my favourite approach.

UntitledImage

Using Small multiples

When there is no clarity about the number of categories, the small multiples feature is significant. For this use case, I went for two columns. Due to five categories, I get an extra blank space. It doesn’t look that bad, but I would like more control over the placement of visuals on the canvas. 

SmallMUltiples

When I compare Five individual visuals to small multiples, small multiples may have better performance from the number of queries point of view, and it also looks a bit tidier with one legend, one axis.

To have the best of both, we can use TreeMap visual as a legend

Tree Map visual as a legend

For the tree map, I used the income level column as a category and distinct count of the same column as value. I have turned off data labels, header icons and tool tips. I ensured I used the same “Max Axis” value for all visuals, making the comparison seamless. 

This approach is cleaner than showing the same legend for each visual and serves the same purpose as the usual legend: a user can identify what is what based on colour or shape and interact by clicking on the legend.Ā 
https://prathy.com/wp-content/uploads/2022/06/2022-06-25_14-49-20-1-3.gif

The benefits of this approach are that your report stands out, a nice big legend is easy to interact with on touch screen devices and looks sleek rather than repeating the same legend. I hope the blog inspires someone out there.

Until next time,

Prathy šŸ™‚

You may also like

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.