4 Replies Latest reply on Sep 21, 2016 5:37 AM by Akriti Lal

    Date difference fixed userid

    Mattia Balzarini

      Hi everybody,

      I find myself into a problem I cannot find a way out.


      I have to columns "UserID" & "OrderDate". I need to calculate how many days passed between each order per user.


      So for example I need to have for User1 the difference in days between his 2nd and his 1st Order, 3rd and 2nd.


      The difference has to be between 2 subsequent orderdates of the same user.


      This shouldn't be solved visually, I need the number of days as a calculated field, basically want a 3 column telling me how many days passed from the user previous Order


      Attached you can find a simplified excel example.


      Ps: the database I'm using is far more complicated than just this 2 columns, the solution should not involve any work on DB to have it fit my need of this case


      Any Idea?