Forum Discussion
Gandarthvader
5 months agoRegular Visitor
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...
- 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 () )
wardy912
Super User
5 months ago
Give this a try
Date Highlight =
VAR TargetDate = SELECTEDVALUE('YourTable'[YourDateColumn])
VAR TodayDate = TODAY()
RETURN
SWITCH(
TRUE(),
TargetDate <= TodayDate, "#00FF00", -- GREEN
TargetDate > TodayDate && TargetDate <= TodayDate + 60, "#FFFF00", -- YELLOW
BLANK()
)
--------------------------------
I hope this helps, please give kudos and mark as solved if it does!
Connect with me on LinkedIn.
Subscribe to my YouTube channel for Fabric/Power Platform related content!