Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Is there a way to change bar colors based on values? Specifically trying to make the bar color green when a positive value, and red when negative value for all categories without manually choosing colors when legend is also provided. The only thing I found so far is the ability to change advanced detail label color but not anything else. Ideally, changing the color should support gradient colors. And the function button only becomes available when legend field is not filled in.
The perfect outcome here would be to have the bars be light green when value is lets say 10 and dark green when the value is 1000 and then light red when -10 and dark red when -1000. DOMO does this well in comparison.
One possible solution we could think of is the use of sub report where a chart will be in its own report with preset theme red/green. The only issue here slicing and dicing may not work as expected with other visuals. I also tried some other 3rd party visuals without any luck so far.
Link to test file: https://gitlab.com/idevaton/power-bi-dashboards/-/blob/main/Bar%20Colors%20Test/BarColors.pbix
Thank you
HI,@Anonymous
Regarding the issue you raised, my solution is as follows:
1. First, you can create a calculation column that automatically divides the data into positive or negative numbers:
status = IF('Data'[Shares]>=0,"over","low")
2. Second, you can modify the visual object Settings as shown below:
3.Here's my final result, which I hope meets your requirements.
We have not yet found a way to implement the color gradient according to the value size, if you find other solutions welcome to share with us.
Please find the attached pbix relevant to the case.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, this solution looks like manually setting a color for each series and this is what we need to avoid. It is okay when there are a couple of values but if the legend had 50+ this solution is not feasable.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.