0 Replies Latest reply on Sep 14, 2016 2:37 PM by Vinayak Raja

    How to put max value from three column to one column?

    Vinayak Raja

      I am trying to find the max value from series of a column which is based on quarter of the year.  I want to output the max value to a new column MAX_value from  these three column but unable to find an error.

       

      My End goal is to populate Column Maxvalue_pre with max value.  Any help will be appericaited. Thanks

       

      if MAX([Pre Entry Q1 Wage Amt]) >= MAX([Pre Entry Q2 Wage Amt]) AND MAX([Pre Entry Q1 Wage Amt]>=MAX([Pre Entry Q3 Wage Amt]) )THEN MAX([Pre Entry Q1 Wage Amt])

      elseif MAX([Pre Entry Q2 Wage Amt]) >= MAX([Pre Entry Q1 Wage Amt]) AND MAX([Pre Entry Q2 Wage Amt]>=MAX([Pre Entry Q3 Wage Amt]) )THEN MAX([Pre Entry Q2 Wage Amt])

      else MAX([Pre Entry Q3 Wage Amt]) >= MAX([Pre Entry Q1 Wage Amt]) AND MAX([Pre Entry Q3 Wage Amt]) >= MAX([Pre Entry Q2 Wage Amt]) THEN MAX([Pre Entry Q3 Wage Amt])

         END as Max_Pre Value