Forum Discussion

dmalviya's avatar
dmalviya
Frequent Visitor
7 years ago
Solved

Table Conditional formating based on text column

Hi All,   I have one column named EventResult. The possible values are - Success, Fail & Neutral.   I am using simple table to show the values. I want to format Backgrould color of column based o...
  • Zubair_Muhammad's avatar
    7 years ago

    dmalviya

     

    You can use this MEASURE for conditional formatting.

     

    See attached file as well

     

    Measure =
    VAR myEventResult =
        SELECTEDVALUE ( Table1[EventResult] )
    RETURN
        SWITCH (
            TRUE (),
            myEventResult = "Success", "#00FDD1",
            myEventResult = "Fail", "#ff2f2f",
            myEventResult = "Neutral", "#ffd62a"
        )