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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
Community Champion
Community Champion

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.



Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors