Forum Discussion

PBandI's avatar
PBandI
Frequent Visitor
2 years ago
Solved

Conditionally Formatting a Date Column

I am currently trying to format a date column based on if the date is in the past or if the date is blank. I am using a measure that I created for this and then passing it on to the conditional forma...
  • vicky_'s avatar
    2 years ago

    Hi! 
    The issue with your DAX measure is that any dates that are BLANK are actually evaluated as 0 (which is less than today in DAX logic), so it will always show green. To fix it, you can add another condition to check if the value is blank:

    _HPA Status = IF(MAX('Opportunity'[HPA Signature Date]) < Today() && NOT(ISBLANK('Opportunity'[HPA Signature Date])), "Light Green" , "Light Red")