pbPassingBI
/

How to show the top 5 and bottom 5 sales in Tableau?

beginner
Answer

The clean approach is two sets combined into one.

Create a set on the dimension with a Top condition — top 5 by `SUM(Sales)` — and a second with a Bottom condition on the same measure. Then select both in the Data pane, right-click and choose Create Combined Set, taking all members of both.

Put the combined set on Rows and the measure on Columns, and you get a single view of ten bars. Because the sets are dynamic, membership updates as the data changes.

A parameter for N makes it adjustable — reference it in each set's condition, and one control drives both.

The alternative is a table calculation using `INDEX()` or `RANK()`, filtered to the first and last N. It works, but the filter applies after the calculation, so the interaction with other filters needs more care than the set approach.

Related questions