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
srkri
Employee
Employee

Applying consistent color format across different graphs

Hi, I have two graphs. One is a treemap and other one is a bar graph both graphed using the same underlying variable. I am trying to map the color coding on the treemap to the bar graph without going and changing every bar color manually on the bar graph. How do I do this quickly? Thanks. 

Sreeram 

6 REPLIES 6
v-gizhi-msft
Community Support
Community Support

Hi,

 

To my knowledge, i think there is no such function can completely reach your requirement.

You can create an idea here, it will be very cool and practical!

https://ideas.powerbi.com/forums/265200-power-bi-ideas 

 

Best Regards,

Giotto

 

Anonymous
Not applicable

Here's a link to another similar discussion that may help:  https://community.powerbi.com/t5/Desktop/Conditional-format-of-bar-chart-based-on-a-table-with-HEX-c...

 

I'm going to play with it to see if it helps with mine.

Anonymous
Not applicable

This will definitely work for the field map.  Download the pbix that Icey gives in the accepted solution.  He has created a measure to read a table with the "item" and hex code.  He uses the measure in the "advanced controls" in the Data Color selection, using Format by: Field Value,  Based on Field: Measure.

 

Unfortunately, my boss wants a pie chart or donut chart, so it won't work for me.  But it does work on the Treemap so you should be golden.

Thanks dpeacock, let me give it a try. 

Anonymous
Not applicable

I'm going through something similar and have put together a table with vendors and corresponding hex colors hoping that I can somehow use that.

 

I did see in a response somewhere that someone built a measure where they assigned color codes to each category being used in a visual but wasn't adept enough to use that to solve my issue.  

 

If I can find that thread, I'll post if for you.

Greg_Deckler
Super User
Super User

@srkri - Perhaps by using a theme but otherwise, I am not aware of an automated way to do what you are asking.

@ 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.