0
0
Tableaubi_tool~10 mins

Type conversion functions 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 convert the string '123' to a number in Tableau.

Tableau
INT([1])
Drag options to blanks, or click blank then click option'
A123
B'123'
C"123"
DSUM('123')
Attempts:
3 left
💡 Hint
Common Mistakes
Using single quotes instead of double quotes for strings.
Passing a number directly without quotes.
Using aggregation functions like SUM on strings.
2fill in blank
medium

Complete the code to convert the number 2023 to a string in Tableau.

Tableau
STR([1])
Drag options to blanks, or click blank then click option'
A2023
BINT(2023)
C"2023"
D'2023'
Attempts:
3 left
💡 Hint
Common Mistakes
Passing a string instead of a number to STR().
Using INT() instead of STR() for conversion to string.
3fill in blank
hard

Fix the error in the code to convert a date string '2023-06-01' to a date in Tableau.

Tableau
DATE([1])
Drag options to blanks, or click blank then click option'
A2023-06-01
B'2023-06-01'
CDATE('2023-06-01')
D"2023-06-01"
Attempts:
3 left
💡 Hint
Common Mistakes
Passing unquoted date strings causing syntax errors.
Using single quotes instead of double quotes for date strings.
4fill in blank
hard

Fill both blanks to convert the string '12.34' to a number and then round it in Tableau.

Tableau
ROUND([1]([2]))
Drag options to blanks, or click blank then click option'
AFLOAT
B"12.34"
CINT
D12.34
Attempts:
3 left
💡 Hint
Common Mistakes
Using INT() which truncates decimals instead of FLOAT().
Passing the number 12.34 directly without quotes.
5fill in blank
hard

Fill both blanks to convert a string '2023-06-01' to a date, then extract the year and convert it to string in Tableau.

Tableau
STR(YEAR([1]([2])))
Drag options to blanks, or click blank then click option'
ADATE
B"2023-06-01"
C'2023-06-01'
DINT
Attempts:
3 left
💡 Hint
Common Mistakes
Using single quotes instead of double quotes for the date string.
Skipping the YEAR() function and converting the whole date to string.
Using INT() instead of STR() to convert the year number to string.