8 Replies Latest reply on Aug 31, 2017 4:17 AM by Richard Silvekroon

    Getting a count and presenting as percentage

    Richard Silvekroon

      I'm a total newbie regarding Tableau, but I'm in need to make some adjustment to some data and in some hurry so hoping someone might lend their assistance. =)

       

      I have data that presents grades for students, but these are totals and I want to present them as a percentage (to answer the following question: "what is the percentage of students receiving a certain grade?"). As the data is located behind SQL servers I don't have access to I'm unable to upload a packaged workbook but will try to show with screenshorts. I have the scaled the report it down and this is what is relevant for this question:

      1.PNG

      As you can see the grand total count is off since one student can have several different grades in a number of courses. The grand total only counts the amount of users not the amount of grades. This is why when I convert the data to percentage it's wrong:

      2.PNG

       

      The amount of users are calculated like this: COUNTD([PersonID]) where the PersonID is a dimension with an ID for every user. The different grades are as you can see in the screenshot listed in a dimension.

       

      To sum up, what I want to do is to show the percentage distribution between the different grade levels.  In screenshot 1 the grand total of grades is 273 (excluding null values). Therefore the percentage of grade level "D" with is 19% but I have yet to find a way to calculate that in Tableau. Any tips?