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! Request now
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 "apple" I want that text to be red.
hi @Anonymous
Thanks for the reply, I'm farely new to Power BI but what does #F0F0F0";"#FFE4B5 mean?
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
Your first question for example if the card displays "apple" I want that text to be red
Measure:
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:
@Anonymous can you show data table, please?
I can't show the exact table due to confidentiality and I understand if you can't solve this because of that, but essentialy I have a table called food:
Food
I only care about the Fruit attribute inside the food table
@Anonymous create a measure:
sel_fruit = SELECTEDVALUE(Colors[Color])
show measure by card and filter option...
the result is Apple?
ps. excellent channel about power bi https://www.youtube.com/watch?v=zHzSBNES6jE
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.