3 Replies Latest reply on Apr 18, 2018 12:59 PM by Amanda Champagne

    Trouble with LOD - putting patients into separate groups based off diagnosis

    Amanda Champagne

      Hi all,

       

      I'm a new Tableau user and having some trouble putting patients into one of three separate buckets:  Treatment Completed, Seeking Treatment, and Other Patients.

       

      The issue is that one patient can have the 'Treatment Completed' diagnosis, as well as any other diagnosis which puts them in the 'Other Patients' group.  For the patient with the 'Treatment Completed' diagnosis, I only want them in that group and not in the 'Other Patient' group despite their having other diagnosis.

       

      Same with the 'Seeking Treatment' diagnosis; if a patient has that (as well as any other diagnosis), I only want them to be in the 'Seeking Treatment' group and not in the 'Other Patients' group.

       

      'Other Patients' are only those without 'Treatment Completed' or 'Seeking Treatment' diagnosis.

       

      My current output:

        

      UserDiagnosis (group)
      A12345Other Patients
      A23456Seeking Treatment
      Other Patients
      A87546Treatment Completed
      Other Patients
      A87654Treatment Completed
      Other Patients
      A98765

      Other Patients

       

      And the output I'd like to have:

        

      UserDiagnosis (group)
      A12345Other Patients
      A23456Seeking Treatment
      A87546Treatment Completed
      A87654Treatment Completed
      A98765Other Patients

       

       

      From what I can see, I need to make a LOD based off User, but I can't figure out how to do it.  I've also tried If statements, Case, and Sets to no avail.

       

      The attached workbook has some sample data, and there is a group with the three diagnosis buckets.

       

      Any help is appreciated; I've been stuck on this for a few days now.

       

      Thanks,

      Amanda