0
0
Tableaubi_tool~10 mins

Top N filters in Tableau - Cell-by-Cell Formula Trace

Choose your learning style9 modes available
Sample Data

Sales data for different fruit products.

CellValue
A1Product
B1Sales
A2Apples
B2100
A3Bananas
B3150
A4Cherries
B490
A5Dates
B5120
A6Elderberries
B680
Formula Trace
INDEX() <= 3
Step 1: Sort products by Sales descending
Step 2: Assign INDEX() to each product in sorted list
Step 3: Evaluate INDEX() <= 3 for each product
Cell Reference Map
Sort by B descending
Apply INDEX() to sorted list
The filter uses the Sales column (B) to sort products and INDEX() to rank them.
Result
   A          B
1 Product    Sales
2 Bananas    150
3 Dates      120
4 Apples     100

(Only top 3 products shown after filter)
The Top N filter shows only the three products with the highest sales.
Sheet Trace Quiz - 3 Questions
Test your understanding
What does the INDEX() function represent in this Top N filter?
AThe total sales of each product
BThe position of each product after sorting by sales
CThe product name length
DThe average sales across all products
Key Result
Top N filters use INDEX() on a sorted measure to keep only the top N rows.