Forum Discussion

mohammadyousaf's avatar
mohammadyousaf
Resolver II
4 years ago
Solved

Duration Calculation between different dates

Hi.. I tried my best but I am stuck and requesting your help for the following from given table.    1. Planned Duration which I can calcualte using= DATEDIFF(MIN('Project Details Sheet'[Planned Sta...
  • lbendlin's avatar
    4 years ago

    You may want to look into using the COALESCE function.

     

    For your "actual completion date" being blank scenario it would say

     

    Actual Completion = COALESCE([Actual Completion Date],TODAY())

     

    meaning that if the date is missing it would be supplemented by the current date.

     

    word of warning! TODAY() depends on either user interaction (if used in a measure) or frequent/daily dataset refreshes (if used in a calculated column). It is not automatic!