You can see top five and bottom five sales with the help of these functions:
- Drag ‘customer name’ to row and sales to the column.
- Sort Sum(sales) in descending order.
- Create a calculated field ‘Rank of Sales’.
Here are the steps to show the top 5 and bottom 5 in tableau:
- Create a calculated field with the calculation as follows:
RANK( SUM( [Sales] ), ‘desc’ ) <= [N Parameter]
OR
RANK( SUM( [Sales] ), ‘asc’ ) <= [N Parameter]
The above calculation returns a TRUE only if SUM( [Sales] ) is the highest N ranking sub-categories for either top N or bottom N .
-
Drag the newly created field to the Filters shelf. Click OK to close the Filter dialog.
-
Right-click the newly created field on the Filters shelf. Select Compute using > Pane (Down).
-
In the Filter dialog, check True. Click OK.
If you want to learn Tableau, check out this Tableau Training Course by Intellipaat.