Challenge - 5 Problems
Type Conversion Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ dax_lod_result
intermediate1:30remaining
Output of INT() conversion in Tableau
What is the output of the following Tableau calculated field?
Assume the input is a string and INT() converts it to an integer.
INT("123.99")Assume the input is a string and INT() converts it to an integer.
Tableau
INT("123.99")Attempts:
2 left
💡 Hint
INT() truncates decimal parts after converting to number.
✗ Incorrect
INT() converts the string to a number and truncates the decimal part, so '123.99' becomes 123.
❓ visualization
intermediate1:30remaining
Visualizing type conversion impact on data
You have a dataset with a field 'Sales' stored as string values like '1000', '2000', '3000'. You want to create a bar chart showing total sales.
Which Tableau calculated field should you use to correctly sum sales as numbers?
Which Tableau calculated field should you use to correctly sum sales as numbers?
Attempts:
2 left
💡 Hint
Sales values have decimals possible, so use a conversion that supports decimals.
✗ Incorrect
FLOAT() converts string to decimal numbers, allowing SUM() to add them correctly. INT() would truncate decimals, STR() converts to string (no sum), and SUM([Sales]) sums strings causing error.
🧠 Conceptual
advanced2:00remaining
Understanding type conversion errors in Tableau
Which of the following scenarios will cause a type conversion error in Tableau when using INT() or FLOAT() functions?
Attempts:
2 left
💡 Hint
Think about what strings can be converted to numbers.
✗ Incorrect
Strings with non-numeric characters like 'abc123' cannot be converted to numbers, causing errors. Other options are valid conversions.
❓ data_modeling
advanced2:00remaining
Choosing correct type conversion for date calculations
You have a string field 'OrderDate' in format '2023-06-15'. You want to calculate the number of days since this date.
Which Tableau calculated field correctly converts 'OrderDate' to a date type for this calculation?
Which Tableau calculated field correctly converts 'OrderDate' to a date type for this calculation?
Attempts:
2 left
💡 Hint
Dates must be converted to date type, not numbers or strings.
✗ Incorrect
DATE() converts string to date type. INT() and FLOAT() convert to numbers causing errors. STR() keeps string type, invalid for date calculations.
🔧 Formula Fix
expert2:30remaining
Debugging type conversion in nested calculations
Given the Tableau calculated field:
Which issue will cause this calculation to fail or produce incorrect results?
IF INT([Score]) > 50 THEN "Pass" ELSE "Fail" ENDWhich issue will cause this calculation to fail or produce incorrect results?
Tableau
IF INT([Score]) > 50 THEN "Pass" ELSE "Fail" END
Attempts:
2 left
💡 Hint
Consider what happens if input is not a clean number string.
✗ Incorrect
INT() fails if input is null or contains non-numeric characters, causing calculation errors. ELSE clause and '>' operator are valid syntax.