0
0
Tableaubi_tool~10 mins

Shape encoding in Tableau - Cell-by-Cell Formula Trace

Choose your learning style9 modes available
Sample Data

Sales data by product category used to assign different shapes in Tableau visualization.

CellValue
A1Category
B1Sales
A2Fruits
B2150
A3Vegetables
B3100
A4Dairy
B480
A5Meat
B5120
Formula Trace
IF [Category] = 'Fruits' THEN 'Circle' ELSEIF [Category] = 'Vegetables' THEN 'Square' ELSEIF [Category] = 'Dairy' THEN 'Triangle' ELSE 'Diamond' END
Step 1: [Category] = 'Fruits'
Step 2: IF True THEN 'Circle' ELSE ...
Step 3: [Category] = 'Vegetables'
Step 4: IF False THEN 'Circle' ELSEIF True THEN 'Square' ELSE ...
Step 5: [Category] = 'Dairy'
Step 6: IF False THEN 'Circle' ELSEIF False THEN 'Square' ELSEIF True THEN 'Triangle' ELSE 'Diamond'
Step 7: IF False THEN 'Circle' ELSEIF False THEN 'Square' ELSEIF False THEN 'Triangle' ELSE 'Diamond'
Cell Reference Map
   A         B
1 Category  Sales
2 Fruits    150
3 Vegetables 100
4 Dairy     80
5 Meat      120

Arrows:
Category (A2:A5) --> Shape encoding formula
The formula uses the Category column (A2 to A5) to decide which shape to assign.
Result
Category   Sales   Shape
Fruits     150     Circle
Vegetables 100     Square
Dairy      80      Triangle
Meat       120     Diamond
Each category is assigned a shape based on the formula: Fruits get Circle, Vegetables Square, Dairy Triangle, and Meat Diamond.
Sheet Trace Quiz - 3 Questions
Test your understanding
What shape is assigned to the category 'Vegetables'?
ACircle
BSquare
CTriangle
DDiamond
Key Result
IF condition1 THEN shape1 ELSEIF condition2 THEN shape2 ELSEIF condition3 THEN shape3 ELSE shape4 END