Forum Discussion
jitpbi
6 years agoPost Patron
Change button colour
Hi, I have to dynamically change the colour of a button based on the field's value. The filed has 3 different values 0,1 & 2, please refer the below example: Field Values Button Color ...
jitpbi
6 years agoPost Patron
Hi,
I have tried with the following measure but it's picking up the green colour only for each value:
Measure = SWITCH(TRUE(),FIRSTNONBLANK('Entity State'[State],"NA") = 0,"green",
FIRSTNONBLANK('Entity State'[State],"NA") = 1,"orange",
FIRSTNONBLANK('Entity State'[State],"NA") = 2,"yellow")
Thanks,
Fowmy
6 years agoSuper User
jitpbi
User Field Value in CF under fill color and assign the Measure below, Button Color Field can have actual color name or HEX Codes
_Color =
VAR _SELECTED = SELECTEDVALUE('Table'[BUTTON COLOR])
RETURN
_SELECTED
If you are satisfied with my answer, please mark it as a solution so others can easily find it.
Don't forget to give KUDOS to replies that help answer your questions
Subscribe to ExcelFort: Learn Power BI, Power Query and Excel