6 Replies Latest reply on Sep 30, 2016 3:27 PM by Dallin Crump

    Calculated fields in 10.0.1 showing original values in filters

    Dallin Crump

      We just upgraded our Tableau Server to 10.0 from 9.3 this week.


      Today as I was using one of the vizes published on our server to give a presentation, I noticed there were extra values showing up in one of the filters.


      Due to the inability to reference groups in previous versions of Tableau, I had used calculated fields to create groups manually and then referenced those calculated fields in other parameters.


      In this example, I have two possible values in the parameter [Campus Type]: "Majority" and "Course". I reference this parameter in a calculated field that, depending on which value is in the parameter, returns the values in 2 other calculated fields: [Majority Campus] or [Course Campus].


      Here is the code behind the [Majority Campus] calculated field:

      CASE [enroll_rcde_site_code]

      WHEN NULL THEN "Unspecified"

      WHEN "CEU Main Campus" THEN "USUE Price"

      WHEN "CEU San Juan Campus" THEN "USUE Blanding"

      WHEN "USU Brigham City Campus" THEN "Brigham"

      WHEN "USU Distance Education" THEN "Logan Online/Broadcast"

      WHEN "USU International Sites" THEN "International"

      WHEN "USU Kaysville Center" THEN "Kaysville"

      WHEN "USU Main Campus" THEN "Logan Main"

      WHEN "USU Moab Center" THEN "Moab"

      WHEN "USU Orem Center" THEN "Orem"

      WHEN "USU Out of State Sites" THEN "Out of State"

      WHEN "USU Price Center" THEN "Price"

      WHEN "USU Salt Lake Center" THEN "Salt Lake"

      WHEN "USU San Juan" THEN "Blanding"

      WHEN "USU Southwest Centers" THEN "Southwest"

      WHEN "USU SPECIAL PROGRAMS" THEN "Special Programs"

      WHEN "USU Tooele Campus" THEN "Tooele"

      WHEN "USU Uintah Basin Campus" THEN "Uintah Basin"

      WHEN "USU Independent Studies" THEN "Independent Studies"

      WHEN "USU Prison Sites" THEN "Prison Sites"

      ELSE [enroll_rcde_site_code]


      Here is the code behind the [Course Campus] calculated field:

      CASE [course_center_code]

      WHEN "1" THEN "USUE Price"

      WHEN "2" THEN "USUE Blanding"

      WHEN "A" THEN "Blanding"

      WHEN "B" THEN "Brigham City"

      WHEN "C" THEN "Southwest"

      WHEN "E" THEN "Moab"

      WHEN "L" THEN "Logan Online/Broadcast"

      WHEN "M" THEN "Logan Main"

      WHEN "N" THEN "Orem"

      WHEN "O" THEN "Kaysville"

      WHEN "P" THEN "Price"

      WHEN "S" THEN "Salt Lake"

      WHEN "T" THEN "Tooele"

      WHEN "U" THEN "Uintah Basin"

      WHEN "X" THEN "Special Programs"

      WHEN "Y" THEN "International"

      WHEN "Z" THEN "Out of State Sites"

      WHEN "I" THEN "Independent Studies"

      WHEN "R" THEN "Prison Sites"

      WHEN "D" THEN "Other"

      WHEN "F" THEN "Other"

      ELSE [course_center_code]


      The reason I created these calculated fields is to get around the limitation in older versions of Tableau that prevented you from referencing groups in calculated fields.


      This solution (clunky as it may be) worked great before the upgrade to Tableau 10. But now it appears that when I attempt to filter on the [Campus] calculated field, it returns not only the values specified in the above CASE statements, but also the original underlying values.


      Screen Shot 2016-09-29 at 4.19.55 PM.png


      I can get around this by creating new groups in Tableau 10 and referencing them in the calculated fields, but I'm wondering if this different behavior on preexisting Tableau workbooks after upgrading from 9.3 to 10 is a bug or just an unfortunate side-effect of the new group functionality.


      If it's a bug, it would be AWESOME if it could be addressed in a future update, as it will require quite a bit of time to go through my existing workbooks and updating them to work as they should.


      If it's not a bug, suggestions on a better workaround or a quicker fix than creating new groups would be appreciated!


      I have included an example workbook if you want to see this behavior for yourself.