In my data I have type of incidents, severity (rank 1-4), risk of mortality (rank 1-4) and number of occurrences
Ex:
Incident | Severity | Risk of Mortality | N |
---|---|---|---|
Liver transplant | 4 | 4 | 3 |
Liver transplant | 3 | 4 | 2 |
Liver transplant | 2 | 4 | 1 |
bone marrow transplant | 4 | 4 | 7 |
In my dashboard it was requested I create a table where the incident, severity and risk of mortality are on the row shelf and the column shelf is N.
I would like the users to be able to filter based on severity and risk of mortality.
I can create filters for these but the issue is if risk categories are selected but no severity categories are selected the table that is returned is empty and vice a versa. My desired result is that if a risk category is selected and no severity categories are selected then just severity is removed and the sum of all severities is returned. This would be the same output as if I removed severity from the shelf
I tried replicating what was done in example 7 in this workbook since it is very close to my desired result: https://public.tableau.com/app/profile/ruiarpereira/viz/ElevateYourTableauSkills-10AdvancedTricks/MainView
However it did not work because the categories I am filtering on are not their own columns in the data. I cannot pivot the data for other reasons.