Forum Discussion

TaroGulati's avatar
TaroGulati
Helper III
1 year ago
Solved

Dynamic sum Datetime difference

Hi all,    I need to calculate the sum of timedifference in below scenario:     I need to calculate the sum of difference between start date & end date of step = A (take minimum start date...
  • ryan_mayu's avatar
    ryan_mayu
    1 year ago

    TaroGulati 

     

    you can try this

     

    Column =
    VAR _start=minx(FILTER('Table','Table'[Category]=EARLIER('Table'[Category])&&'Table'[Step]="A"&&'Table'[Type]=EARLIER('Table'[Type])),'Table'[Start Date])
    var _end=minx(FILTER('Table','Table'[Category]=EARLIER('Table'[Category])&&'Table'[Step]="B"&&'Table'[Type]=EARLIER('Table'[Type])),'Table'[Start Date])
    return if ('Table'[Start Date]=_start,_end-'Table'[Start Date])
     
     
    pls see the attachment below