Forum Discussion
Gandarthvader
5 months agoRegular Visitor
Conditional format date based on another date
Hello, I've found some similar suggestions to my issue, but nothing yet that has solved it. My appologies if I'm just missing something, but I have a table with a 2026 Due Date and 2026 Completion Da...
- 5 months ago
You can use a measure like
Cond formatting = IF( ISBLANK( SELECTEDVALUE( 'Table'[Completion Date] ) ), VAR CurrentDueDate = SELECTEDVALUE( 'Table'[Due Date] ) VAR InNext30Days = CurrentDueDate >= TODAY() && CurrentDueDate <= TODAY() + 30 VAR PastDue = CurrentDueDate < TODAY() VAR Result = SWITCH( TRUE(), PastDue, "red", InNext30Days, "yellow" ) RETURN Result )and apply that as conditional formatting for the background for the due date.
johnt75
5 months agoSuper User
You can use a measure like
Cond formatting = IF(
ISBLANK( SELECTEDVALUE( 'Table'[Completion Date] ) ),
VAR CurrentDueDate = SELECTEDVALUE( 'Table'[Due Date] )
VAR InNext30Days = CurrentDueDate >= TODAY() && CurrentDueDate <= TODAY() + 30
VAR PastDue = CurrentDueDate < TODAY()
VAR Result = SWITCH( TRUE(),
PastDue, "red",
InNext30Days, "yellow"
)
RETURN Result
)
and apply that as conditional formatting for the background for the due date.