6 Replies Latest reply on Apr 30, 2018 2:42 PM by Pablo de Dios Garcia

    when to use case/if statements - mix datatypes

    Karen Schaefer

      Is it possible to conditionally format multiple fields using just 1 function? gpa_category(text), cost(number)

       

      case [gpa_category]

           when [gpa_category] = 'c' then avg([costs])

           when [gpa_cateogry] = 'm' then avg([mgmt.)]

           when [gpa_category] = 'q' then avg([qual])

           when [gpa_category] = 's' then avg([sch])

           else avg([tech])

      end

       

      which type should be used, I have tried both case and if without success.

       

      thanks,

       

      Karen