1 Reply Latest reply on Mar 10, 2015 2:31 PM by Joe Oppelt

    Multiple IF Statement

    Carlos Flores

      If ([Course]=1 and [Status]="Completed") and ([Course]=10 and [Status]="Completed")

          then "is Taking path 1-10"

              elseif ([Course]=3 and [Status]="Completed") and ([Course]=8 and [Status]="Completed")

                 then "is Taking Path 3-8"

                      end

       

         

      EmailCourseStatus
      Learner11Completed
      Learner12Completed
      Learner13Completed
      Learner14Completed
      Learner15Completed
      Learner16Completed
      Learner21Completed
      Learner22Completed
      Learner23Completed
      Learner27Completed
      Learner28Completed
      Learner29Completed

       

       

      Ideally i would want it to tell me that Learner 2 completed Path 3-8.

       

      Any idea how to get it to work? ive tried different ways to set this up

        • 1. Re: Multiple IF Statement
          Joe Oppelt

          Maybe there are more elegant ways to approach this, but I would do this:

           

          Reshape the data so that each learner has a field for each possible course.

           

          Use a three-value code in each field:

           

          0 = Not started

          1 = Started

          2 = Completed

           

          Now your calc can tell everything about every course in one glance.  (You could even have other codes for "dropped", "credit, but not taken", and anything else you might need.  You could also have the grade in there.  If it's not 1,2, or 3, then the value is the grade.  Etc.)

           

          You could still store it all in another relational database, but your data wource would be an ETL of the actual database to have it shaped for easy use in this visualization.

           

          Maybe someone else will propose something better, and if so I will squirrel it away in my bag of tricks.