Forum Discussion
Coniditionally Format Color on Clustered Bar Charts
- 5 years ago
Hi andrew5083 ,
As far as I know, currently multiple fields applying conditional format could not support in power bi charts visual.
You can vote for these simliar idaes or create a new idea here to help us improve power bi and make this feature coming sooner:
- Conditional Formatting in Clustered column chart
- Conditional Formatting in Bar chats
- Enable Conditional formatting for Legends and columns series in Stacked bar
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi!
You can create a measure assigning the different colors such as the following
SWITCH (
TRUE (),
ISBLANK ( [Projected Active Users % of Target YTD] ), "#FFFFFF00",
[Projected Active Users % of Target YTD] < .9, "#FF0000",
[Projected Active Users % of Target YTD] < 1, "#FFFF00",
[Projected Active Users % of Target YTD] < 1.25, "#00CC00",
[Projected Active Users % of Target YTD] >= 1.25, "#0099FF",
BLANK ()
)and then apply it as conditional formatting.
https://docs.microsoft.com/en-us/power-bi/visuals/service-tips-and-tricks-for-color-formatting
littlemojopuppy unfortunantely this doesn't work either. I attempted this when creating a 'color measure' as referenced in my original post. However, if there are >1 bar in a bar chart the option to conditionally format any color does not appear.
- littlemojopuppy5 years agoCommunity Champion
It does work if you define the measure properly...have done it in a number of projects I've worked on
- andrew50835 years agoFrequent Visitor
I'm not sure how else to define this measure properly. Here is a simple if statement I've used to set the color based on pos or neg values.
As you can see in the picture, there are no options to conditionally format the color of any column in that bar chart.
If I add the created "Conditional Format" measure to the analysis, it only allows it to be added to the Tooltip section and still, no options to conditionally format any value colors appear.
Are you able to access the menu to apply conditional formatting to a bar chart with 2 or more values being represented as bars?
As I mentioned in my original post, the conditional formatting menu is available when a bar chart contains just 1 bar as shown below. I can then use the created 'color measure' to color the bars. However, this limitation does not create useful analyses for our user base.
I'm wanting to see if something has been overlooked, or if this basic functionality is still not avaialble in Power BI.
- v-yingjl5 years agoCommunity Support
Hi andrew5083 ,
As far as I know, currently multiple fields applying conditional format could not support in power bi charts visual.
You can vote for these simliar idaes or create a new idea here to help us improve power bi and make this feature coming sooner:
- Conditional Formatting in Clustered column chart
- Conditional Formatting in Bar chats
- Enable Conditional formatting for Legends and columns series in Stacked bar
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.