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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
AlainDelhaise
Frequent Visitor

Default color plus conditional formatting on bar charts

Hello,

 

I am having trouble with conditionally formatting columns in a bar chart while maintaining a default color.

 

In the below chart I set the default color to dark red and added a line of conditional formatting to format to a lighter shade of red if another measure for that month returned blank.

 

2022-10-27 16_40_30-Window.png

 

 

 

 

 

 

 

 

 

 

As you can see, it formats correctly and the legend shows a red dot for the data series. Here is the formatting page:

 

a46ae691-52f8-4284-9b55-3823909ea4f3.png

 

And this makes sense to me - I set the default color to dark red, then add formatting if a condition is met.

 

I created that a few months ago. However now, I am trying to add a new chart using the same format but when I attempt to apply the same formatting, it does not maintain the dark red color. (I copied and pasted the previous graph and re-did the formatting.) It resets the default color to blue, and does not remember the dark red.

 

2022-10-27 16_46_10-Window.png

 

 

 

 

 

 

 

 

 

At this point if I modify the formatting on the previous graphs I made a few months ago, I cannot get the original formatting back and have to quit without saving.

 

I have tried using a color measure:

ChartColor =
    IF (
        [XXXXXX] = BLANK(),
        "#BA7D7B",
        "#965755"
    )
 
But the legend is now incorrect.
 
b790a04a-8670-45dd-841d-0da295fba2cb.png
 
Has something changed recently or am I doing something incorrectly? 
3 REPLIES 3
amitchandak
Super User
Super User

@AlainDelhaise , I think when you line clustered bar, it does not change the legend based on conditional formatting. It does that for pie and for bar it does not show a legend.

Hello @amitchandak, I am not looking to change the legend based on conditional formatting, I understand that is not supported, but it appears as though somehow a few months ago I could set the default color for the bars and then add conditional formatting on top, and now I cannot.

 

See the first image I posted, it both has a correct legend color and conditional formatting on the bars.

@AlainDelhaise , I tried all three options(Gradient, rule, field), not able to get the first one. May be an issue in the new release. check and report an issue, if needed: https://community.powerbi.com/t5/Issues/idb-p/Issues

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.