How Can You Display the Top Five and Bottom Five Sales in the Same View?

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:

  1. Create a calculated field with the calculation as follows:

RANK( SUM( [Sales] ), ‘desc’ ) <= [N Parameter]


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 .

  1. Drag the newly created field to the Filters shelf. Click OK to close the Filter dialog.

  2. Right-click the newly created field on the Filters shelf. Select Compute using > Pane (Down).

  3. In the Filter dialog, check True. Click OK.

If you want to learn Tableau, check out this Tableau Training Course by Intellipaat.