Search code examples
tableau-apidonut-chart

Calculated field and creating pie chart/donut using this calculated field


I have this following table

| Name | Group | Group1 | Group2 | Course  | Completed |
|------|-------|--------|--------|---------|-----------|
| abc  | Engg  | Civil  | single | engg1   | y         |
| abc  | Engg  | Civil  | single | math123 | y         |
| abc  | Engg  | Civil  | single | advmath | y         |
| def  | Engg  | Mech   | single | engg1   | y         |
| def  | Engg  | Mech   | single | math123 | n         |
| def  | Engg  | Mech   | single | advmath | y         |
| ghi  | Engg  | Civil  | double | engg1   | y         |
| ghi  | Engg  | Civil  | double | math123 | n         |
| ghi  | Engg  | Civil  | double | advmath | n         |
| ijk  | Engg  | Mech   | double | engg1   | y         |
| ijk  | Engg  | Mech   | double | math123 | y         |
| ijk  | Engg  | Mech   | double | advmath | y         |

I am trying to create a pie/donut chart to show % of students that have not completed all the course.

Can someone please help?


Solution

  • If you want to compare completed = y versus completed = n simply:

    • create a new sheet
    • double click on the completed field (to add it to the sheet)
    • double click on [Number of Records] (to add it to the sheet)
    • Click on Show Me (top right) and choose pie graph

    It should look like this in the end .... enter image description here

    EDIT: ah ok, I understand the data now, here's the result by creating 2 calculated fields:

    enter image description here

    enter image description here

    enter image description here