Forum Discussion

oliverome's avatar
oliverome
Regular Visitor
2 years ago
Solved

Using DAX for converting dates to status categories

Hi all, I have a question about using DAX to convert dates into a corresponding status. I have a column with calibration due dates for some equipment. There are a few possibilities: - The equipment...
  • oliverome's avatar
    oliverome
    2 years ago

    Thank you again for your help! The first if-statement needed a slight modification, as it interpreted a blank cell as 0, therefore giving all blank cells the output 'urgent action required'. I have added an 'is not blank' statement to that line and now it works perfectly.

     

    Thanks!

     

    IsCalibrationDue = 
    
    IF (  [calibration_due]  <= TODAY() && NOT(ISBLANK([calibration_due])), "Urgent Action Required",
    IF (  [calibration_due]  >= EDATE(TODAY(), 3), "OK",
    IF (  [calibration_due] > TODAY() && [calibration_due] < EDATE(TODAY(), 3), "Set up new Calibration",
    IF ( [calibration_due] = BLANK(), "Set Up Calibration Date"))))