Challenge - 5 Problems
String Functions Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ dax_lod_result
intermediate2:00remaining
Extracting Left Part of a String
Given a field ProductCode with values like 'AB12345', which Tableau calculation correctly extracts the first two characters?
Attempts:
2 left
💡 Hint
Think about which function extracts characters from the start of the string.
✗ Incorrect
LEFT(string, number) extracts characters from the start. RIGHT extracts from the end. CONTAINS checks for substring presence. Negative length is invalid.
❓ visualization
intermediate2:00remaining
Highlighting Rows Containing a Substring
You want to highlight all rows where the CustomerName contains the substring 'Smith'. Which calculated field formula will return TRUE for those rows?
Attempts:
2 left
💡 Hint
CONTAINS checks if the first argument string includes the second argument substring.
✗ Incorrect
CONTAINS(string, substring) returns TRUE if substring is found in string. LEFT and RIGHT extract parts but do not check substring presence. The order of arguments in CONTAINS matters.
🧠 Conceptual
advanced2:00remaining
Understanding RIGHT Function Behavior
What will the expression
RIGHT('DataScience', 4) return in Tableau?Attempts:
2 left
💡 Hint
RIGHT extracts characters from the end of the string.
✗ Incorrect
RIGHT('DataScience', 4) returns the last 4 characters: 'ence'.
🔧 Formula Fix
advanced2:00remaining
Identify the Error in String Function Usage
Which option will cause an error when used as a calculated field in Tableau?
Attempts:
2 left
💡 Hint
Check if negative length arguments are allowed in LEFT or RIGHT functions.
✗ Incorrect
LEFT and RIGHT functions do not accept negative length arguments. Using -1 causes an error.
🎯 Scenario
expert3:00remaining
Combining String Functions for Conditional Labeling
You have a field EmployeeID with values like 'EMP2023X'. You want to create a calculated field that returns 'Senior' if the last character is 'X', otherwise 'Junior'. Which formula achieves this?
Attempts:
2 left
💡 Hint
Check which function extracts the last character and compare it to 'X'.
✗ Incorrect
RIGHT([EmployeeID], 1) extracts the last character. Comparing it to 'X' correctly identifies 'Senior'. LEFT checks the start, CONTAINS checks anywhere, and RIGHT with 2 characters compares two characters, not one.