Forum Discussion

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

Count Entry and exit times

I have a table with the fields: Name Date Type Time Index and Times The index column has this formula: =CONTAR.SI($A$2:A2,A2) The times column has this formul...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi MaritoDominguez ,

     

    You could create two calculated columns as follows.

    Index = COUNTROWS(FILTER('Table',[Hora]<=EARLIER('Table'[Hora])&&[Nombre]=EARLIER('Table'[Nombre])))

    Diff = var _pre=CALCULATE(MAX('Table'[Hora]),FILTER('Table',[Index]<EARLIER('Table'[Index])&&[Nombre]=EARLIER('Table'[Nombre])))
    return IF(ISBLANK(_pre),BLANK(),[Hora]-_pre)

     

    You can download the attachment for more details.

     

                                                                                                                                                             

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.