Help with complex valueexpression for late tasks
In a project collections report, I'm trying to work through this text mode to show:
If milestone = Complete, CONCAT "Completed, actualCompletionDate" (that part is working)
If milestone isn't complete, CONCAT "Due, plannedCompletionDate" and if the planned completion date is past $$TODAY, include [RED DOT]🔴 🔴 . If planned completion date < $$TODAY, include 🟢.
This value expression is successfully showing tasks that are complete or that are not complete but not overdue: valueexpression=IF({milestone}.{name}="STRATEGY APPROVED",IF(AND({status}="DED", {plannedCompletionDate}<$$TODAY), "🔴 [RED DOT]🔴 N/A",IF(AND({status}="DED", {plannedCompletionDate}>$$TODAY), "🟢 N/A",IF(CONTAINS("CPL",{status}), CONCAT("Completed ",{actualCompletionDate}),IF({plannedCompletionDate}<$$TODAY, CONCAT("🔴 [RED DOT]🔴 ",{plannedCompletionDate}),CONCAT("🟢 ",{plannedCompletionDate}))))))
Any ideas on where I'm going wrong that I'm not pulling in tasks that are NOT complete and ARE overdue (and including that [RED DOT])? FYI that for some reason the red dot isn't populating here so i've put RED DOT in its place.