0
0
Tableaubi_tool~10 mins

Parameter actions 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 parameter that allows users to select a value.

Tableau
CREATE PARAMETER 'Sales Threshold' AS [1];
Drag options to blanks, or click blank then click option'
Ainteger
Bboolean
Cdate
Dstring
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing string type will not allow numeric comparisons.
Using date or boolean types are unrelated to sales values.
2fill in blank
medium

Complete the code to set the parameter's allowable values to a range from 1000 to 10000.

Tableau
SET 'Sales Threshold' VALUES TO RANGE([1], 10000, 1000);
Drag options to blanks, or click blank then click option'
A100
B1000
C5000
D10000
Attempts:
3 left
💡 Hint
Common Mistakes
Using 100 or 5000 as start will create incorrect ranges.
Using 10000 as start reverses the range.
3fill in blank
hard

Fix the error in the parameter action code to update the parameter on selection.

Tableau
ON SELECT SET PARAMETER 'Sales Threshold' TO [1];
Drag options to blanks, or click blank then click option'
ASELECTED_VALUE(Sales)
BMIN(Sales)
CSUM(Sales)
DMAX(Sales)
Attempts:
3 left
💡 Hint
Common Mistakes
Using SUM or MAX returns aggregated values, not the selected one.
MIN is also an aggregate, not the selected value.
4fill in blank
hard

Fill both blanks to create a calculated field that uses the parameter to filter sales.

Tableau
IF [Sales] [1] [2] THEN 'Above Threshold' ELSE 'Below Threshold' END
Drag options to blanks, or click blank then click option'
A>
B<
C[Sales Threshold]
D1000
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<' reverses the logic.
Using a fixed number instead of the parameter ignores user input.
5fill in blank
hard

Fill all three blanks to create a parameter action that updates the parameter when a user clicks a sales bar.

Tableau
CREATE PARAMETER ACTION ON [1] TO SET 'Sales Threshold' TO [2] USING [3];
Drag options to blanks, or click blank then click option'
Aclick
BSELECTED_VALUE(Sales)
CSales
Dhover
Attempts:
3 left
💡 Hint
Common Mistakes
Using hover triggers the action on mouseover, not click.
Using aggregate functions instead of selected value causes errors.