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
SameekshaM
Frequent Visitor

Formatting Data bars in Table with diverging colors.

Hi,

I have a table where I'm showing numeric data as data bars.

All these values are positive & the bars are shown in only one color.

I want to show these bars in diverging colors based on the values.

Refer to the below image to further understand this.

 

SameekshaM_0-1615187180097.png

 

Any help on this would be highly appreciated.

Thanks & Regards,

Sameeksha

 

@MFelix @PhilipTreacy @GuyInACube @zhouguyin 

1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @SameekshaM ,

Unfortunately, the current version cannot realize this idea. It is impossible to change the color of data bars in table visual as the value changes. Please submit your idea.
https://ideas.powerbi.com/ideas/ 

Maybe you can do it by writing Python or custom visuals.
Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-kkf-msft
Community Support
Community Support

Hi @SameekshaM ,

Unfortunately, the current version cannot realize this idea. It is impossible to change the color of data bars in table visual as the value changes. Please submit your idea.
https://ideas.powerbi.com/ideas/ 

Maybe you can do it by writing Python or custom visuals.
Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

PhilipTreacy
Super User
Super User

Hi @SameekshaM 

 

Download example PBIX file

 

You need to create a Conditional Formatting rule like this. But set the upper and lower values for each color to what suits your data

colorsrules2.png

colorsrules.png

regards

Phil

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Hi @PhilipTreacy ,

You are using a clustered bar chart visual to do this.

I want to accomplish this with a table visual, where other columns hold other information & one column shows numeric data in the form of data bars with diverging color scheme as shown in the image above.

Is there any way i can do this?

Hi @SameekshaM ,

 

The table visualization bar does not allow to have a condittional formatting on the bar itselfs, one option I can suggest is using the databars also add a custom background with different colours. in this case I would also suggest creating a custom measure for that using some transparency:

 

Colour Formatting = SWITCH( TRUE(), SUM('Table'[Value]) >= 20 , "#F22D0A50")

 

MFelix_0-1615215125914.png

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



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.