Forum Discussion
Power BI format X-axis text color for different elements
Hi all,
I have a requirement where in I have to color the X-axis element "More than 20 days" with red color. Please note, I do not have to color the bar red. Instead, just the text in the axis. Rest all other elements should stay black. Is it possible?
5 Replies
- DataZoe
Microsoft Employee
Anonymous I don't think this is possible directly, as in specify that one to be red. But you can create a text box and format it how you like with a white background and overlay it over that bar label.
- AnonymousNot applicable
Thanks DataZoe
I have a limitation when using a text box. The categories are not fixed and are showen/hidden based on the count.
So positioning of text box cannot be static.
Is there any way I could make it dynamic?
- v-easonf-msft
Community Support
Hi , Anonymous
Dynamic text box or X-axis text colors for different elements is not supproted yet currently in Power BI.
For your requirement , you can come up with a new idea and add your comments there to make this feature coming sooner. https://ideas.powerbi.com/forums/265200-power-bi-ideas
Best Regards,
Community Support Team _ Eason
- amitchandak
Super User
Anonymous , Try like this will work when you are not using legend . Create a measure like
color measure = if(FIRSTNONBLANK(Table[Calegory],"NA")= "More than 20 Days","red","green") color measure = if(max(Table[Calegory])= "More than 20 Days","red","green")Table[Calegory] is your x-axis
Then in conditional formatting choose the field and this measure.
Color Field - Color Measure - Conditional formatting
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- AnonymousNot applicable
Thanks for you answer, amitchandak
I am however unable to add conditional formatting on my column chart. I do not get the option at all for it.
The link you included explains it for a table.
Am I missing something here?