Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Icon for Administrator rankAdministrator
5 years ago
Solved

Calculation of days within the same table

Hello I have a record that brings the date on which a group of online paperwork applications went through every possible state. For the same requestid the table brings as many records as ...
  • v-kelly-msft's avatar
    v-kelly-msft
    5 years ago

    Hi  Syndicate_Admin ,

    Create a column as below:

    datediff = 
    var _date=IF('Table'[Contenid]="in analysis",CALCULATE(MIN('Table'[Date]),FILTER('Table','Table'[Contenid]="approved"&&'Table'[id]=EARLIER('Table'[id])&&'Table'[Date]>EARLIER('Table'[Date]))))
    Return
    DATEDIFF('Table'[Date],_date,DAY)

    And you will see:

    Check my sample .pbix file attached.

     

    Best Regards,
    Kelly

    Did I answer your question? Mark my reply as a solution!