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 ...
Anonymous
7 years agoNot applicable
Thanks for the reply, I'm farely new to Power BI but what does #F0F0F0";"#FFE4B5 mean?
evandrocunico
Resolver III
7 years ago- 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
- evandrocunico7 years ago
Resolver III
Your first question for example if the card displays "apple" I want that text to be red
Measure:
COLOR = iF(SELECTEDVALUE(Tabela1[FRUIT])=BLANK(); "#f2f2f2";iF(SELECTEDVALUE(Tabela1[FRUIT])="Apple";"#ff0000";iF(SELECTEDVALUE(Tabela1[FRUIT])="Avocato";"#55ff22";"#ff7722")))CARD - Data label - color - conditional format - field value by COLOR- Anonymous7 years agoNot applicable
Hate to bother you again but I tried the code you suggested and it pretty much worked however it displays "#ff0000" in red, and not the text like "Apple" in red.
What I have:
IF(SELECTEDVALUE(Colors[Color])="Apple","#ff0000",IF(SELECTEDVALUE(Colors[Color])="Watermelon","#55ff22","#ff7722"