0
0
Tableaubi_tool~10 mins

Top N filters in Tableau - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a Top N filter using a parameter in Tableau.

Tableau
IF RANK_UNIQUE(SUM([Sales])) <= [1] THEN 'Top N' ELSE 'Others' END
Drag options to blanks, or click blank then click option'
A[Region]
B[Category]
C[Top N Parameter]
D[Date]
Attempts:
3 left
💡 Hint
Common Mistakes
Using a dimension like [Category] instead of the parameter.
Using a measure instead of a parameter for the filter.
2fill in blank
medium

Complete the code to rank products by sales in descending order for a Top N filter.

Tableau
RANK_UNIQUE(SUM([Sales]), [1])
Drag options to blanks, or click blank then click option'
ADESC
BASC
CNONE
DRANDOM
Attempts:
3 left
💡 Hint
Common Mistakes
Using ASC which ranks lowest sales first.
Using NONE or RANDOM which are invalid for ranking order.
3fill in blank
hard

Fix the error in the calculated field to correctly filter Top N customers by sales.

Tableau
IF RANK_UNIQUE(SUM([Sales])) [1] [Top N Parameter] THEN 'Top Customers' ELSE 'Others' END
Drag options to blanks, or click blank then click option'
A<=
B>
C==
D!=
Attempts:
3 left
💡 Hint
Common Mistakes
Using '>' which excludes the top N ranks.
Using '==' which only includes one rank.
4fill in blank
hard

Fill both blanks to create a Top N filter that ranks by sales and filters accordingly.

Tableau
IF RANK_UNIQUE(SUM([Sales]), [1]) [2] [Top N Parameter] THEN 'Top' ELSE 'Other' END
Drag options to blanks, or click blank then click option'
ADESC
B<=
C>
DASC
Attempts:
3 left
💡 Hint
Common Mistakes
Using ASC for ranking which orders lowest sales first.
Using '>' which excludes the top N ranks.
5fill in blank
hard

Fill all three blanks to create a Top N filter that ranks products by sales descending and filters top N.

Tableau
IF RANK_UNIQUE(SUM([1]), [2]) [3] [Top N Parameter] THEN 'Top Products' ELSE 'Others' END
Drag options to blanks, or click blank then click option'
A[Sales]
BDESC
C<=
DASC
Attempts:
3 left
💡 Hint
Common Mistakes
Using ASC for ranking which orders lowest sales first.
Using '>' which excludes the top N ranks.
Using a wrong measure instead of [Sales].