Unfortunately drop box is blocked at my work place could you please attach the data directly in your message
There you go
1 of 1 people found this helpful
This is a fairly common problem in tableau, you may find the following links helpful:
Finding the Top N Within a Category | Tableau Software
It seems there are two main ways to accomplish this, method 1 includes using a nested sort to sort the rows with each category then applying an index calculation to rank and filter. Option 2 forgoes the nested sort and handles everything within an advanced table calculation.
Attached I have included a workbook using your supplied dataset that demonstrates how these two methods can be used to accomplish what you are looking for. Hope this helps but please let me know if you have any further questions.