8 Replies Latest reply: Jul 11, 2018 11:40 PM by Vishwarath Nagaraju RSS

    Min of a Value and Generate Missing Values

    Pakalapati Sai Kumar

      Hello All,

       

      I have the following table :

       

       

      Articel_CodeDate_FromCost
      67601.01.20023,58
      67601.03.20023,78
      67601.03.20033,98
      67601.07.20048,21
      67601.07.20058,37
      67601.02.20098,55
      67601.02.20108,64
      67601.02.20118,9
      67601.02.20129,08
      67601.02.20139,22
      67615.01.20149,35
      67601.02.20159,78
      67601.02.20169,92
      67615.01.2018

      10

       

      And i have two requirements from this:

       

      1. The Year 2002 is repeated twice, i only want the cost against the Minimum(First Date) of Date_From (i.e, 3,58)

       

      2. The cost is missing against the Years 2006,2007,2008 and 2017. Here i would like to replace it with the value from previous Year Cost.

       

      Expected Result:

       

        

      Articel_CodeDate_FromCost
      67601.01.20023,58
      67601.03.20033,98
      67601.07.20048,21
      67601.07.20058,37
      67601.07.20068,37
      67601.07.20078,37
      67601.07.20088,37
      67601.02.20098,55
      67601.02.20108,64
      67601.02.20118,9
      67601.02.20129,08
      67601.02.20139,22
      67615.01.20149,35
      67601.02.20159,78
      67601.02.20169,92
      67601.02.20179,92
      67615.01.201810

       

      I tried getting the min of value with FirstSortedValue Funaction and then Generating the Missing Values using AutoNumberHash.

      But, it didn't get the expected result.

       

      TIA!!

       

      Changed the Expected Result