Forum Discussion

Gandarthvader's avatar
Gandarthvader
Regular Visitor
5 months ago
Solved

Conditional Formatting Measure Highlighting Dates in Past and Future

Hello,   I currently have a measure created to highlight the date in a table if it's within the next 60 days YELLOW, but it also included today.   What I'd like to do, and can't figure out, is ho...
  • cengizhanarslan's avatar
    5 months ago

    Please try the measure below:

    Open Color =
    VAR _Date    = MAX ( 'Current'[Current OTP] )
    VAR _Today   = TODAY ()
    RETURN
        SWITCH (
            TRUE (),
            _Date <= _Today,              "#92D050",  
            _Date <= _Today + 60,         "#FFFF99",
            BLANK ()
        )