3 Replies Latest reply on Jul 21, 2016 1:28 PM by Jeff Strauss

    Logical function for string that returns integer?

    mark.welsh

      I want to perform a CASE or IF THEN on a string field and return an integer that I can then SUM or use as a measure in another way.  Here is what I have:

       

      case ATTR([Priority MisTriageID]) when "1" then 1

      when "routine" then 3

      when "S" then 5

      when "SCHEDULED" then 5

      when "URGENT" then 2

      when Null then 0 end

       

      But I'm unable to use the result in a SUM.  Could I wrap the entire statement in an INT?

       

      Thanks for any help.