Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
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 a card if the card value said "CLOSED".
FontColor = IF(CONTAINSSTRING([AddressMeasure],"Closed"),"#FF0000","#000000")
I am currently working on a report that has roughly 25 cards and therefore I would have to create 1 measure for each card, so 25 measures. Is there a way that I could have 1 generic measure that could be placed in "ANY" card conditional formatting section.
Something like... FontColor = IF(CONTAINSSTRING([Any_Measure],"Yes"),"#FF0000","#000000")
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
@StuartSmith , this video has technique to reduce measure refer
https://www.youtube.com/watch?v=vlnx7QUVYME from GuyinaCube
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 80 | |
| 49 | |
| 35 | |
| 31 | |
| 30 |