0
0
Tableaubi_tool~10 mins

Parameter controls 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 lets users select a year.

Tableau
CREATE PARAMETER YearSelector AS [1];
Drag options to blanks, or click blank then click option'
ADATE
BSTRING
CINTEGER
DBOOLEAN
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing STRING type instead of INTEGER.
Using DATE type which includes day and month.
2fill in blank
medium

Complete the code to set the parameter's allowable values to a list of years from 2018 to 2022.

Tableau
SET ALLOWABLE VALUES TO [1];
Drag options to blanks, or click blank then click option'
ARANGE(2018, 2022)
BLIST(2018, 2019, 2020, 2021, 2022)
CVALUES(2018 TO 2022)
DARRAY(2018, 2019, 2020, 2021, 2022)
Attempts:
3 left
💡 Hint
Common Mistakes
Using RANGE which is not valid in Tableau parameter syntax.
Using ARRAY which is not a Tableau function.
3fill in blank
hard

Fix the error in the parameter control expression to filter data by the selected year.

Tableau
FILTER [Sales] WHERE YEAR([Order Date]) = [1]
Drag options to blanks, or click blank then click option'
A[Parameters.YearSelector]
BParameters.YearSelector
CYearSelector
D[YearSelector]
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting brackets around the parameter name.
Using 'Parameters.' prefix which is not valid in Tableau.
4fill in blank
hard

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

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[SalesThreshold]
D[Threshold]
Attempts:
3 left
💡 Hint
Common Mistakes
Using less than operator instead of greater than.
Using wrong parameter name or missing brackets.
5fill in blank
hard

Fill all three blanks to create a parameter control that updates a sales target and calculates the difference.

Tableau
CREATE PARAMETER [1] AS INTEGER;
SET DEFAULT [2];
CALCULATED FIELD Difference = [Sales] - [3];
Drag options to blanks, or click blank then click option'
ASalesTarget
B100000
C[SalesTarget]
DTargetSales
Attempts:
3 left
💡 Hint
Common Mistakes
Using inconsistent parameter names.
Not using brackets when referencing parameter in calculation.