Forum Discussion

Guneet_B21's avatar
Guneet_B21
Helper II
4 years ago
Solved

Datediff

Hi, i need to calculate the difference between est date on the first entry of the project vs est date on the last entry of a particular project and need to show this diff against each project   ...
  • ddpl's avatar
    4 years ago

    Guneet_B21 

     

    Try this,

     

    measure = VAR _min =
    MINX(FILTER(ALL('Table'),SELECTEDVALUE('Table'[Project]) ='Table'[Project] ),'Table'[Est star])

    VAR _max =
    MAXX(FILTER(ALL('Table'),SELECTEDVALUE('Table'[Project]) ='Table'[Project] ),'Table'[Est End])

    Return
    DATEDIFF(_min,_max,DAY)