Forum Discussion
StuartSmith
6 years agoPower Participant
Conditional Formatting based on cards text value.
I previously posted this question (https://community.powerbi.com/t5/Desktop/Card-Visual-Text-Colour-based-on-card-content/td-p/804248) and was given the below answer that would make the "Font" red on...
swise001
6 years agoContinued Contributor
You will create one measure that handles the color logic - and then you refer to that measure in the conditional formatting section of the visual. Something similar to this -- just change out the <= for [yourmeasure] = "yourtext"
Color Selector =
SWITCH (
TRUE (),
[Win %] <= 0.40, "#FF0000",
[Win %] <= 0.65, "#FFCC00",
[Win %] <= 1, "#00FF00"
)
Set conditional formatting on any part of the visual (table column, card data label, card category label, etc) that has reference to Win%
Select "Field Value" and the color measure you created.
Instant color!
And you can reuse this method across your whole report