Forum Discussion
Anonymous
7 years agoNot applicable
How to Conditionally format text in a Card in Power BI
I have a Card in a power BI Dashboard that that displays roughly 6 unique text attributes depending on the input. How do I add a separate color to each attribute, for example if the card displays ...
evandrocunico
Resolver III
7 years agohi Anonymous
card_color = if(fieldvalue = "APPLE";"#F0F0F0";"#FFE4B5")
CARD - format - data label, conditional formatting - field value - select card_color
regards.
- Anonymous7 years agoNot applicable
Thanks for the reply, I'm farely new to Power BI but what does #F0F0F0";"#FFE4B5 mean?
- evandrocunico7 years ago
Resolver III
- Anonymous7 years agoNot applicable
I know this dosen't work but I think this is close to what I want. How could I fix this to get each text value assigned to a color.
Test Color = VAR Color = SELECTEDVALUE(Table[Color])
Return
SWITCH(TRUE(),
Color = "#FF0000", "Apple" )
Then Conditional format by field Value