5 Replies Latest reply on Jul 25, 2018 8:18 PM by Alex Braga

    Identifying a range of string values

    Alex Braga

      Hi all,

       

      I'm trying to flag procedure codes (CPT codes) for carve out payment. I would love to be able to select these CPT codes within Tableau, because I would like to create parameters out of them, in order to allow the user to choose these codes and change their payment rate.

      Flagging individual codes is not a issue. But in situations like anesthesia CPT codes (where there are about 1000 of them) picking them individually is just not an option.

       

      The column proccode below, is a string variable, 5 character long, that could be numbers only set as character (sequential "00000" to "99999"), or starting with a letter followed by four numbers.

       

      I would love to create an IF statement that says something of the type: IF proccode IN (00100:01999) THEN FLAG = "ANES"; /*this is SAS code*/

       

      Is there a way that I could do such a thing in Tableau? That is, flag a range of string values?

       

      I guess a work around this would be to bring the full list of anesthesia CPT codes in a separate file and then join with the main dataset, and flag those that way. Any other workarounds you may know that I don't?

       

      But if there is a way to do this with functions, it would be amazing.

       

       

      Example of a CPT code list

       

      proccode
      E0935
      A4595
      E0730
      A4595
      A4557
      E0730
      A4595
      A4557
      E0730
      A4557
      A4595
      E0730
      A4595
      A4557

       

      Thanks in advance!

       

      Alex