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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
yudhi5
Frequent Visitor

Conditional formatting color on x-axis label

Hi All,

I'm working on bar chart with x-axis contain year & week arrangement. I want to apply some conditional formatting on x-axis label to give indication of particular week, ie. week 43 with different color against the rest. i have arrange additional column 'cweek' contain '0' and '1' to differentiate current week vs the rest.

 

However, when i apply conditional formatting, with any method, turns out all the color still same and no difference on current week. (gradient, rules, field value with column 'cweekcol'). Any idea how to work on conditional formatting or 1-0 condition cannot work here?

 

i prefer to apply coloring in the x axis label, not the data label, bar to ensure the color is there even when the data is zero (bar not shown).

conditional_formatting_color_xaxislabelconditional_formatting_color_xaxislabel

 

conditional_formatting_color_xaxislabel 

 

thanks in advance.

1 ACCEPTED SOLUTION
BeaBF
Impactful Individual
Impactful Individual

@yudhi5 Hi! 

There is no way you can do it, because in the axis of the chart, as in the title, you are not in the filter context, so it applies the same value to all the labels, he cannot understand the underlying value what you see. 

 

BBF

View solution in original post

6 REPLIES 6
harlanrodrigo
Regular Visitor

Hi, @yudhi5!

 

I have exctally the same need that you, but the conditional formatting is not working as well. All the axis-label changed but don't how the filter was builded.

 

Do you find any solution to this?

 

Thank you very much!

lucadelicio
Super User
Super User

Same problem any resolution 😞

Why there is a conditional formatting pane if this doesn't works with the filter context?

 

Mah!

Luca D'Elicio

Please change the condition like below see if it works for you. Instead of percent use number

YendeMazo_0-1668715281762.png

 

 

Is not the same FX option.

 

lucadelicio_0-1668762531192.png

lucadelicio_1-1668762542560.png

 

There isn't the icon field.

 

Thank you in any case.

Luca D'Elicio
BeaBF
Impactful Individual
Impactful Individual

@yudhi5 Hi! 

There is no way you can do it, because in the axis of the chart, as in the title, you are not in the filter context, so it applies the same value to all the labels, he cannot understand the underlying value what you see. 

 

BBF

JontyB
Frequent Visitor

thanks for this explanation, ive been pulling my hair our trying to work out why my axis wasnt shows the correct colour, and from your explanation i realies that i was using another table to provide the X-axis therefore my condiditonal formatiing has no idea of the value of my calculation... 

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors