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.
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.
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.
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.
You will find Power BI sessions and more with Power Platform @ ESPC22.
About the Author:
Hi! I’m Prathy Kamasani, born in India and living in London. Currently, working as an independent contractor. I love smiles, technology and art. Technology excites me that eventually brought me into the data world. Hence, this blog is all about my journey with data.
Kamasani, P. (2021). USING TREE MAP AS LEGEND ON A PAGE IN POWER BI. Available at: https://prathy.com/2022/06/using-tree-map-as-legend-on-a-page-in-power-bi/ [Accessed: 27th September 2022].