0
0
Tableaubi_tool~10 mins

Color encoding 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 assign a color to the 'Sales' measure in Tableau.

Tableau
SUM([1])
Drag options to blanks, or click blank then click option'
AProfit
BQuantity
CSales
DDiscount
Attempts:
3 left
💡 Hint
Common Mistakes
Using a different measure like Profit or Quantity instead of Sales.
2fill in blank
medium

Complete the code to create a calculated field that colors marks red when Sales are below 5000.

Tableau
IF SUM(Sales) [1] 5000 THEN 'Red' ELSE 'Green' END
Drag options to blanks, or click blank then click option'
A<
B>
C=
D>=
Attempts:
3 left
💡 Hint
Common Mistakes
Using > instead of < which reverses the condition.
3fill in blank
hard

Fix the error in the calculated field to color marks based on Sales above 10000.

Tableau
IF SUM(Sales) [1] 10000 THEN 'Blue' ELSE 'Orange' END
Drag options to blanks, or click blank then click option'
A>=
B=>
C==
D<=
Attempts:
3 left
💡 Hint
Common Mistakes
Using => which is invalid syntax.
Using == which is not supported in Tableau calculations.
4fill in blank
hard

Fill both blanks to create a color encoding that marks sales between 3000 and 7000 as Yellow.

Tableau
IF SUM(Sales) [1] 3000 AND SUM(Sales) [2] 7000 THEN 'Yellow' ELSE 'Gray' END
Drag options to blanks, or click blank then click option'
A>=
B<
C<=
D>
Attempts:
3 left
💡 Hint
Common Mistakes
Using > instead of >= which excludes 3000.
Using < instead of <= which excludes 7000.
5fill in blank
hard

Fill all three blanks to create a color encoding that marks sales above 8000 as Green, below 4000 as Red, and others as Blue.

Tableau
IF SUM(Sales) [1] 8000 THEN 'Green' ELSEIF SUM(Sales) [2] 4000 THEN 'Red' ELSE [3] END
Drag options to blanks, or click blank then click option'
A>
B<
C'Blue'
D>=
Attempts:
3 left
💡 Hint
Common Mistakes
Using >= instead of > which changes the boundary condition.
Not putting 'Blue' in quotes which causes syntax errors.