0
0
Tableaubi_tool~10 mins

String functions (LEFT, RIGHT, CONTAINS) 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 extract the first 3 characters from the field 'ProductName'.

Tableau
LEFT([ProductName], [1])
Drag options to blanks, or click blank then click option'
A3
B5
C1
D0
Attempts:
3 left
💡 Hint
Common Mistakes
Using 0 returns an empty string.
Using 5 extracts too many characters.
2fill in blank
medium

Complete the code to extract the last 4 characters from the field 'OrderID'.

Tableau
RIGHT([OrderID], [1])
Drag options to blanks, or click blank then click option'
A4
B2
C6
D1
Attempts:
3 left
💡 Hint
Common Mistakes
Using 2 extracts too few characters.
Using 6 extracts too many characters.
3fill in blank
hard

Fix the error in the code to check if 'CustomerName' contains the substring 'Smith'.

Tableau
CONTAINS([CustomerName], [1])
Drag options to blanks, or click blank then click option'
ASmith
C'Smith'
D"Smith"
Attempts:
3 left
💡 Hint
Common Mistakes
Not using quotes causes syntax errors.
Using single quotes is invalid in Tableau.
4fill in blank
hard

Fill both blanks to extract the first 2 characters from 'Category' and check if it contains 'El'.

Tableau
CONTAINS(LEFT([Category], [1]), [2])
Drag options to blanks, or click blank then click option'
A2
B3
C"El"
D"Ele"
Attempts:
3 left
💡 Hint
Common Mistakes
Using 3 extracts too many characters.
Not quoting the substring causes errors.
5fill in blank
hard

Fill both blanks to check if the last 3 characters of 'Region' contain 'USA'.

Tableau
CONTAINS(RIGHT([Region], [1]), [2])
Drag options to blanks, or click blank then click option'
A2
B"USA"
C3
D"US"
Attempts:
3 left
💡 Hint
Common Mistakes
Using 2 extracts too few characters.
Not quoting the substring causes errors.