6 Replies Latest reply on Apr 10, 2018 9:38 AM by Deepak Rai

    Calculate difference of Date in the same column

    Cristian Garofalo

      Dears,

      I'm struggling with a simple calculation between dates on the same column,

       

      My set of data looks like this:

      PO#ItemtypeDate
      45009202391GR1/12/2018
      45009202392GR1/12/2018
      45009202391IN1/14/2018
      45009202881GR1/14/2018
      45009202881IN1/9/2018

       

      and I would like to obtain a report By PO# & "Item" (unique combination)  which will display the date difference  between Type "IN" - TYPE "GR"

       

      The output of the report should be

         

      PO#Itemdate Diff
      450092023912
      45009202392NULL
      45009202881-5

      Comments:

      4500920239 --> 1          1/14 - 1/12

      4500920239 --> NULL  Because there is GR But not IN

      4500920288 --> -5        1/9 - 1/14

       

      Can you please advise?

      Thanks a lot,

      Cristian