14 Replies Latest reply on Jul 17, 2018 2:09 PM by Nathan Schwinnen

    Number field as a dimension

    Nathan Schwinnen

      I know this is probably answered on the forums somewhere, but I wasn't really sure how to search for it and get the results I'm looking for. 

       

      I have a calculated filed called "SCORE" that adds the value of five dimensions together.  "SCORE" can range from 1-5.  I want to calculate how many times each score occurred in comparison to the total, so that I have a table that looks like this:

       

      Score     % of Total

      1               20%

      2               20%

      3               20%

      4               20%

      5               20%

       

      I'm having difficulty with this because Tableau wants to sum the numbers together, not list them out separately.  I have tried a couple of calculated fields to turn "SCORE" into a string:

       

      STR([SCORE])

      and

      IF [SCORE] = 1 THEN "*"

      ELSE IF [SCORE] = 2 THEN "**"

       

      Either way, Tableau still wants to aggregate these calculated fields.

       

      Any help would be appreciated.