Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Need help in calculating date difference in following

In this data I need to calculate date difference System.changed date. We are given with ID along with rev which is order of System.State change. Suppose we are having first ID 1049352 , for this ID , rev=1 i.e state is new and rev=13 when it is first time done. So we need to calculate date difference [( rev=13 Done)-(rev=1 New)]. Then similarly we have to go for next ID. Please help.

2 Replies

  • Anonymous , Try a measure like

     

    AverageX(Summarize(Table, Table[ID], "_1", Minx(filter(Table, Table[System.state]="New"), [System.Createdatetime]), "_2", Minx(filter(Table, Table[System.state]="Done"), [System.Createdatetime])), datediff(_1,_2,day))

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Amit thanks for solution . I am trying this solution. If I get any difficulty in implementation I will get back to you. Thanks a lot