Forum Discussion
Conditional formatting not applying on axis based on values in same table
- 1 year ago
Hi di_12
Unfortunately the conditional formatting for the axis font color is evaluated once in the overall filter context of the visual, not separately for each value on the axis. This means the axis font color will always be the same for all values. 😞
(You can verify this by examining the DAX query for the visual.)
One workaround might be to get creative with data labels, which are formatted per data point. For example, you could
- Use a stacked bar chart.
- Create a dummy constant measure and display it below the existing measure.
- Use a measure returning the date value as a data label for the dummy measure.
- Apply conditional formatting the the data label font color.
- Create a reference line to act as the axis if required.
Small example of this method attached. It's a bit inconvenient and there may be formatting issues, but it's at least an option.
Alternatively, you could look at using something like Deneb where you can customize the logic more easily, or there may be another suitable custom visual out there.
Regards
Hi di_12
Unfortunately the conditional formatting for the axis font color is evaluated once in the overall filter context of the visual, not separately for each value on the axis. This means the axis font color will always be the same for all values. 😞
(You can verify this by examining the DAX query for the visual.)
One workaround might be to get creative with data labels, which are formatted per data point. For example, you could
- Use a stacked bar chart.
- Create a dummy constant measure and display it below the existing measure.
- Use a measure returning the date value as a data label for the dummy measure.
- Apply conditional formatting the the data label font color.
- Create a reference line to act as the axis if required.
Small example of this method attached. It's a bit inconvenient and there may be formatting issues, but it's at least an option.
Alternatively, you could look at using something like Deneb where you can customize the logic more easily, or there may be another suitable custom visual out there.
Regards