Skip to main content
Showing results for 
Search instead for 
Did you mean: 

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Regular Visitor

Treemap summarization of a quick measure



I'm trying to use a Treemap for showing average values from a quick measure for a category and its details. However, it seems that the Treemap is sorting the category over the sum of the averages of each detail instead of the averages overall.


My Treemap looks like this:



My quick measure looks like this:

AverageWorkingHours =
    SUM('FactCampusQtdDocentes'[Quantidade Docentes])
FactCampusCH looks like this:


FactCampusQtdDocentes looks like this:




I noticed that each category block (e.g. campuses CTC, CCS, CFH, CCS, etc.) is sorted over the sum of each of their details (average working hours of Departments) but I wanted the biggest average to appear first and not the biggest sum. This makes it seems that "CTC" has bigger average working hours than "CTE" (because CTC has more Departments, making the sum of its averages bigger than CTE), which is not true.



If I take the details off, the Treemap looks (correctly) like this (CTE first, CDS second, etc.):



I wanted to maintain this correct order with the details. But once I put on the details the Treemap changes the ordering 😞


Any ideas on how can I achieve this?




Super User
Super User

@nathaliaalves , Tree Map does not support the sort option. The usual trick is to add a tooltip and sort of that

Sorry, I didn't quite understand. I don't want to "sort", I just want the order of the category "blocks" to be based on the average and not the sum of the details.

Helpful resources

Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.