12 Replies Latest reply on Aug 22, 2018 10:50 AM by Dan Cory

    [Question] Creating a breakdown in a total 100% bar based on a double conditional

    Lawrence Alatrash

      if ([STUDENT_TYPE] = 'ALPHA' AND [CLASS] = 'A') THEN 'TRUE' ELSE

      if ([STUDENT_TYPE] = 'ALPHA' AND [CLASS] = 'B') THEN 'FALSE' ELSE

      if ([STUDENT_TYPE] = 'BETA' AND [CLASS] = 'B') THEN 'TRUE' ELSE

      if ([STUDENT_TYPE] = ' BETA ' AND [CLASS] = 'A') THEN 'FALSE' ELSE

      if ([STUDENT_TYPE] = 'CHARLIE' AND [CLASS] = 'A') THEN 'TRUE' ELSE

      if ([STUDENT_TYPE] = ' CHARLIE ' AND [CLASS] = 'B') THEN 'FALSE' ELSE

      if ([STUDENT_TYPE] = 'DELTA' AND [CLASS] = 'B') THEN 'TRUE' ELSE

      if ([STUDENT_TYPE] = ' DELTA ' AND [CLASS] = 'A') THEN 'FALSE' ELSE

       

      tabluepictureidea.png

      Sorry for the paint picture here, but above is what I'm essentially trying to show in Tableau.  That snippet of Excel is a sample of the type of data, and the long if statement is the logic I'm using.  I want to show a total 100% breakdown bar for each student type, with what % is true and what % false, but I can't seem to figure it out.  When I create that calculated field, I actually only get "NULL" so I must have an error with that if statement as well, I'm guessing.  Any help would be greatly appreciated