Forum Discussion
Anonymous
3 years agoNot applicable
Change chart X axis formatting with measure
Hi all
I am trying to change some of the data to colour 1 and other to colour 2 with measure
Bar color =
SWITCH( TRUE(),
CONTAINSSTRING( SELECTEDVALUE( 'Data'[PLACE] ), "EUROPE" ), "Red",
CONTAINSSTRING( SELECTEDVALUE( 'Data'[PLACE] ), "AMERICA" ), "Green",
BLANK()
)
when used on columns it is working just fine, but when applied to x axis values nothing is changing
2 Replies
- andhiii079845
Solution Sage
You can use the condtional formatting to change the bar chart.
https://blog.enterprisedna.co/power-bi-conditional-formatting-for-chart-visuals-whats-possible/You can also generate with the the dax code the color of the bar chart.
https://community.fabric.microsoft.com/t5/Desktop/Conditional-format-of-bar-chart-based-on-a-table-with-HEX-colour/td-p/1049726 - AnonymousNot applicable
Hi!
I would not like to color the bar, but I would like to color the x axis text by grop, for example if the city is in Europe color would be Red and if in America then Green
Is that possible?