Forum Discussion
Conditional Formatting for Specific Column, Label (y-axis) or Date (x-axis)
- Anonymous1 year ago
Thanks for Kedar_Pande and lbendlin's concern about this issue.
Hi, sergioquerido
I am glad to help you.In Power BI, we can set all X-axis values to be uniformly a certain color:
But unfortunately, it is not possible to individually display the value of an X-axis as a certain color by creating a conditional format, which is not directly supported by Power BI Desktop itself.
If you really want to display the X-axis values in a certain color, perhaps you can use it in conjunction with Table visual, something like this:
I have attached the pbix file for this small example below, I hope it helps.
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Create a Measure to Identify Special Days:
Apply Conditional Formatting:
This approach should allow you to highlight those specific days with a different color.
Your Kudos/Likes are much appreciated!
If this post helps, please consider Accepting it as the solution to help the other members find it more quickly.
Regards,
Kedar Pande
www.linkedin.com/in/kedar-pande
Thanks Kedar_Pande ,
The following code works with the conditional formatting for collumns and labels but not for dates in x-axis.
10.0_ReferencePoints =
SWITCH(TRUE(),
SELECTEDVALUE('1.0_DateFilter'[Date]) = LASTDATE(ALL('1.0_DateFilter'[Date]))-7, 1,
SELECTEDVALUE('1.0_DateFilter'[Date]) = LASTDATE(ALL('1.0_DateFilter'[Date]))-14, 2,
0)