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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mglasser
Advocate I
Advocate I

Color code based on hierarchy in treemap

Is it possible to use a treemap to the relationship and size of a category and then use its hierarchical rollup to determine its color?  For example, I want to see sales by State.  The treemap would show the largest states by sales with the largest boxes next to each other and so on.  Now I want to color code those boxes based on the Region for each State, where each State rolls up to a Region.  The Region can be converted to a numeric measure if that helps.  The trick is that I want the state boxes to remain relative to each other and just use color for regions.  If I put Region in the treemap, it currently sizes the region boxes and also reorders the states within each region box.  The coloring works the way I want, but I do not want the region boxed.  Is this possible?

3 REPLIES 3
Nhallquist
Helper V
Helper V

You can, but it is really clunky, and manual.  In my case, I have Sales people that are associated to a group of states.  I made a Treemap of sales by state.  Then I went into the Format area, and under Data Colors, I manually adjusted the colors so each Salesperson's states were similar colors.  Jane, for example, has MN, WI, and IA.  I opened the Data Color menu and manually assigned those states Purple.  I don't know of a way to dynamically set the colors to gradient shade based on some sort of rank.  This is the best I could come up with.  What it does do, is help me understand which sales people have the best states becuase their colors are grouped together.  You'll have to get creative it you have too many regions, but I think you get the idea.  Also, be sure to look through the custom Visualizations available for download.  You could find something good there.  You may want to also look at a Bubble chart or scatter plot for this too. There are more otions for color saturation in those charts.

 

Good Luck,

 

Nate

The two of you mention setting the colors for each category.  Where do I do that?  Are you expecting to set a color for each State or for each Region?  I see Data Colors under Format, but I only see options for min and max.  I also see a color for center if diverging is used.  The closest I can get is to use a numeric rank for each and try to get a palette that works with diverging colors. 

Greg_Deckler
Super User
Super User

You can manually set your colors for each treemap category to the same for each region, not sure how else you would get there. Paintbrush, Data colors.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.