0
0
Tableaubi_tool~10 mins

Manual sort order in Tableau - Cell-by-Cell Formula Trace

Choose your learning style9 modes available
Sample Data

Sales data by category with categories Medium, High, and Low.

CellValue
A1Category
B1Sales
A2Medium
B2300
A3High
B3500
A4Low
B4200
Formula Trace
IF [Category] = 'High' THEN 1 ELSEIF [Category] = 'Medium' THEN 2 ELSE 3 END
Step 1: [Category] = 'High'
Step 2: IF TRUE THEN 1
Step 3: ELSEIF [Category] = 'Medium'
Step 4: IF TRUE THEN 2
Step 5: ELSE 3
Step 6: Resulting ranks: High=1, Medium=2, Low=3
Cell Reference Map
   A       B
1 Category Sales
2 Medium   300
3 High     500
4 Low      200

[Category] values in column A are referenced in the formula.
The formula uses the Category column (A2:A4) to assign manual sort ranks.
Result
   A       B      C
1 Category Sales  Rank
2 High     500    1
3 Medium   300    2
4 Low      200    3
Categories sorted manually by Rank column: High first, then Medium, then Low.
Sheet Trace Quiz - 3 Questions
Test your understanding
What rank does the category 'Medium' get in the manual sort order?
A1
B2
C3
D0
Key Result
IF [Category] = 'Value1' THEN 1 ELSEIF [Category] = 'Value2' THEN 2 ELSE 3 END assigns manual sort ranks.