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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

how to conditionally format dimension axis labels

I have a line chart of sales by week.  Some weeks are holiday weeks.  I'd like to show this context on the line chart by conditionally formatting the week axis labels (say, by formatting them as red text instead of the default black text).  Is this possible?  If so, how can I achieve this?  My sample pbix file for this is at:

https://drive.google.com/file/d/19izDMHc67w2GFEQWcu-oyvCRP98VQ9uk/view?usp=sharing

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , You will not be able to format line axis label.

You can get conditional formatting done on the marker. Create a bar, do conditional formatting and make it like with markers and then you can get it.

 

You can create a color measure like example and use that in conditional formatting with "Field value option"

 

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , You will not be able to format line axis label.

You can get conditional formatting done on the marker. Create a bar, do conditional formatting and make it like with markers and then you can get it.

 

You can create a color measure like example and use that in conditional formatting with "Field value option"

 

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.