Forum Discussion

Daxtothemax's avatar
Daxtothemax
Helper I
4 years ago
Solved

Earlier Task Duration Greater Than or Less Than

Looking for a DAX formula that would know if the previous day duration was less than the current day duration (meaning the duration increased). If it was true then take the previous day duration, if ...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Daxtothemax ,

     

    Please refer this formula.

    Column = 
    var pre = CALCULATE(MIN('Table'[Remaining Duration]),FILTER(ALLEXCEPT('Table','Table'[Task ID]),'Table'[Date]=EARLIER('Table'[Date])-1))
    return
    IF(ISBLANK(pre)||'Table'[Remaining Duration]<pre,'Table'[Remaining Duration],pre)

     

    Best Regards,

    Jay