1 Reply Latest reply: Jan 27, 2014 2:09 AM by ben lim RSS

    Class()

    ben lim

      Hi I am using this function call Class where it will categorize the value into groups

       

      say if my value output is 0 4 5 6 7 8 8 8 9 10 30

      It will categorize to

      0-3  -- 1

      4-6  -- 3

      7-9  -- 5

      etc

       

      using the function class(value,3)

       

      However my value do contain negative such as -4 -7 -12 0 4 5 6 7 8 8 8 9 10 30

       

      I would like all the negative to categorize to 0 and the rest will be 1-3 etc etc. how can this be done? i tried using this expression but it group all the negative to 0-3

       

       

      =

      if(Tranship_Dwell < 0,'0',

      Class(ceil(ceil(Tranship_Dwell/1440)) ,$(var_Dwell)
      ))