Forum Discussion

anongard's avatar
anongard
Helper I
9 years ago
Solved

DATEDIFF with blank dates

Hello all,   I'm struggling hard with the datediff function right now. My problem is this:   I have two columns of dates, column A is a start date and column B is a finish date. Every column has ...
  • Anonymous's avatar
    Anonymous
    9 years ago

    anongard,

    What days do you want to return for those blank end dates? If you want to return the days between start date and today when the end date us blank, you can use the following DAX to calculate age of the record.

    Column = IF(ISBLANK(Table[End Date]),DATEDIFF(Table[Start Date],TODAY(),DAY),DATEDIFF(Table[Start Date],Table[End Date],DAY))


    Regards,