0
0
Tableaubi_tool~10 mins

Measure 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 filter that only shows sales greater than 1000.

Tableau
IF SUM([Sales]) [1] 1000 THEN 'Show' ELSE 'Hide' END
Drag options to blanks, or click blank then click option'
A<
B=
C>
D<=
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<' will filter sales less than 1000.
Using '=' will only show sales exactly equal to 1000.
2fill in blank
medium

Complete the code to filter average profit less than 500.

Tableau
IF AVG([Profit]) [1] 500 THEN 'Keep' ELSE 'Remove' END
Drag options to blanks, or click blank then click option'
A<=
B<
C>=
D>
Attempts:
3 left
💡 Hint
Common Mistakes
Using '>=' will include profits greater than or equal to 500.
Using '>' will filter profits above 500, which is opposite.
3fill in blank
hard

Fix the error in the filter to show only records where total quantity equals 200.

Tableau
IF SUM([Quantity]) [1] 200 THEN 'Valid' ELSE 'Invalid' END
Drag options to blanks, or click blank then click option'
A=
B<
C>
D!=
Attempts:
3 left
💡 Hint
Common Mistakes
Using '!=' means not equal, which is incorrect here.
Using '>' or '<' will filter quantities greater or less than 200, not equal.
4fill in blank
hard

Fill both blanks to filter records where average discount is between 5% and 20%.

Tableau
IF AVG([Discount]) [1] 0.05 AND AVG([Discount]) [2] 0.20 THEN 'In Range' ELSE 'Out of Range' END
Drag options to blanks, or click blank then click option'
A>=
B<
C<=
D>
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<=' for the upper bound includes 20%, which may not be intended.
Using '>' for the lower bound excludes 5% exactly.
5fill in blank
hard

Fill all three blanks to filter sales where total sales are greater than 1000, profit is at least 200, and quantity is less than 50.

Tableau
IF SUM([Sales]) [1] 1000 AND SUM([Profit]) [2] 200 AND SUM([Quantity]) [3] 50 THEN 'Selected' ELSE 'Not Selected' END
Drag options to blanks, or click blank then click option'
A>
B>=
C<
D<=
Attempts:
3 left
💡 Hint
Common Mistakes
Using '>=' for sales includes 1000, which is not correct here.
Using '<=' for quantity includes 50, which is not intended.