1 Reply Latest reply on Apr 20, 2018 2:11 AM by kumar bharat

    DateDiff between rows IF...

    Robert Chung

      Hi,

       

      I´m trying to figure out the diff between dates in different rows only if the gap between dates in different rows is less than 10 days. If more than 10 days I don't want to sum that at all, then a sum of datediff i current row is fine.

      See example of data structure below.

       

      Anyone that could help me out?

       

      Thanks!

      Robert

       

       

       

      Example

      ID                         MinStartDate                 MaxEndDate     

      123456                 2009-01-13                     2010-01-12    

      123456                 2018-03-03                     2019-03-02