Forum Discussion

jake4001's avatar
jake4001
Frequent Visitor
2 years ago

Color code measure for entire table

Hi all, I have a table that looks like this, with many irrelevant columns between Team and ExceededGoalBy. I want to color code every row based on a calculation from the ExceededGoalBy column. How would I write a measure that I can use for Field Value in the conditional formatting with the following logic: if ExceededGoal <0, then use the color red. Else if >= 0 and <5, use color yellow, else if >= 5 then use green. Can somehow help me figure out how to write this DAX measure?

 

TeamRandomColumn1RandomColumn2

ExceededGoalBy

1ahg5
2bd12
3de0
4fu2
5er7

1 Reply

  • jake4001 this color measure:

     

    Color Measure = 
    VAR __Exceeded = SELECTEDVALUE ( Table[Exceeded Goal By] )
    RETURN
    SWITCH ( TRUE (),
        __Exceeded >= 5, "Green",
        __Exceeded >= 0, "Yellow",
        "Red"
    )