A Top N filter returns data according to a number you assign it — hence the “N” in the name. For example, you have 1,000 products that your company sells and you want to view only the top 5 products: For that, you’d use a Top N filter.
SEE: Research: Digital transformation initiatives focus on collaboration (TechRepublic Premium)
Tableau supports Top N filters, but they can be a bit tricky to create. I’m going to show you how to do just that via the Tableau Desktop App using the Superstore sample data.
What you’ll need
To make this work, you’ll need a Tableau account, the Superstore sample data added, and the Tableau Desktop App installed.
How to create the Top N filter
Are you ready? This isn’t quite intuitive, so hold on to your seats.
Open the Tableau Desktop app and then connect to the Superstore sample data. Once you’ve done that, expand the entries in the left pane until you see Manufacturer. Drag Manufacturer to the Rows shelf and then drag Sales to the Columns shelf (Figure A).
Figure A
In the Data tab in the left pane, click the drop-down and then select Create Parameter (Figure B).
Figure B
Name the new parameter Top N. Under Allowable values, click Range and then select the checkboxes for Minimum and Maximum (Figure C).
Figure C
Click OK. Next, on the Rows shelf, right-click on Manufacturer and select Edit Filter (Figure D).
Figure D
In the resulting window (Figure E), click the Top tab. Select By Field and then, in the second drop-down, select “Top N.” Make sure Sales and Sum are selected in the other drop-downs and click OK.
Figure E
Back in the Data pane (far left pane), under Parameters, right-click on Top N and select Show Parameter (Figure F).
Figure F
Once you’ve done this, you should see a Top N slider in the upper right corner of the view (Figure G).
Figure G
Congratulations, you just created your first Top N filter in Tableau! Your data is now much easier to filter by top products, services and sales.
Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.