0
0
Tableaubi_tool~8 mins

Parameter for top N control in Tableau - Dashboard Guide

Choose your learning style9 modes available
Dashboard Mode - Parameter for top N control
Dashboard Goal

Show the top N products by sales, where N is controlled by a user parameter.

Sample Data
ProductCategorySales
AlphaElectronics500
BetaElectronics300
GammaFurniture450
DeltaFurniture200
EpsilonOffice Supplies150
ZetaOffice Supplies100
EtaElectronics350
Dashboard Components
  • Parameter: Top N - Integer parameter with values from 1 to 7, default 3. Controls how many top products to show.
  • Calculated Field: Rank by Sales - RANK_UNIQUE(SUM([Sales]), 'desc') ranks products by total sales descending.
  • Filter: Top N Filter - Filter to keep only products where [Rank by Sales] <= [Top N].
  • Bar Chart: Shows Product on Y-axis and SUM(Sales) on X-axis, filtered by Top N.
  • Table: Lists Product, Category, and Sales for the filtered top N products.
Dashboard Layout
+----------------------+----------------------+
|      Top N Parameter  |      Bar Chart       |
|    (User Control)     |  (Top N Products)    |
+----------------------+----------------------+
|                      Table (Top N Products)  |
+----------------------------------------------+
    
Interactivity

The Top N Parameter lets the user select how many top products to display.

Changing this parameter updates the Top N Filter, which filters both the bar chart and the table to show only the top N products by sales.

Self Check

If you set the Top N parameter to 2, which products appear in the bar chart and table?

Answer: The two products with highest sales are Alpha (500) and Eta (350). So only these two appear.

Key Result
Dashboard showing top N products by sales controlled by a user parameter.