1 Reply Latest reply on Aug 12, 2016 4:35 PM by Shinichiro Murakami

    Creating a bar chart w/ percentages when the variable is binary

    Heather Mechler

      Hello all-

      Long-time listener, first-time caller. I have an issue that I suspect will be easy to solve, but I'm not able to figure it out on my own or reviewing the other Tableau Community threads.

       

      I have a data set containing information about incoming college students from 2006 to now. There are a set of variables within this data (titled sem01-sem20) that are binary variables indicating whether a student was enrolled in that particular semester (0= no, 1 =yes). Each row is a unique student who entered in a particular year. It looks like this:

       

      Capture.JPG

       

      My objective is to create bar charts where instead of telling me how many people from each cohort year were enrolled (i.e., providing a sum), I want to see what percentage of all students from that cohort year have a 1 under that semester's column. So, in essence, I'm trying to show what percentage of students who entered in (year) were enrolled in semester ____ (01-20).

       

      So far, I've only been able to create something that looks like this:

       

      Capture1.JPG

       

      I want there to be bars that reflect percentage of the total entering cohort (i.e., the number of folks reflected in Sem01) who are still enrolled as of a specific semester.

       

      Any insight into how I can do this is much appreciated!

       

      Thanks,

      Heather