5 Replies Latest reply: Jun 7, 2017 3:10 AM by Sergey Shuklin RSS

    Previous Value

    Michele Pierobon

      Hi Qlikers,

      i need to know how can i obtain this result:

      I have a table with ITEM, MONTHS, MOV DATE, INVENTORY DATE and MIN MOV DATE.

      There are several Items that have some movement dates; i've taken the maximum movement date per month.

      PROBLEM:

      I need to calculate a date that is the INVENTORY DATE if minimum movement date is higher than the inventory date.

      It's the MIN MOV DATE if the minimum movement date is equal to the mov date and

      it's the last minimum MOV DATE when min mov date is lower then the mov date.

       

      I need to solve it on the script.

       

      Maybe everything is more clear in the picture.

      Thanks in advance.