Forum Discussion
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
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
1 Reply
- amitchandak
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