Forum Discussion

Tahech's avatar
Tahech
Helper I
3 years ago
Solved

Calculate date difference between two specific categories

Hi guys,   Well, this problem is hard to explain, but here we go.   Consider this a tab with the following columns: ID, TITLE, PHASE, START_DATE, ( id enters the phase) END_DATE, (id leaves ...
  • amitchandak's avatar
    3 years ago

    Tahech , You can take diff between various stage

     

    example

    new Column= 

    Var _max = maxx(table, Table[ID] = earlier(Table[ID]) && [Start Date] < earlier([Start Date]) ), [Start Date])

    return

    datediff(_max, [Start Date], day)

     

     

    Power BI DAX- Earlier, I should have known Earlier: https://youtu.be/CVW6YwvHHi8