Bird
Raised Fist0
Tableaubi_tool~10 mins

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

Choose your learning style10 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.

Practice

(1/5)
1. What is the main purpose of using manual sort order in Tableau?
easy
A. To arrange items in a custom order that is not alphabetical or numerical
B. To automatically sort data by date
C. To filter out unwanted data points
D. To create calculated fields for sorting

Solution

  1. Step 1: Understand sorting options in Tableau

    Tableau allows sorting by alphabetical, numerical, or manual order.
  2. Step 2: Identify manual sort purpose

    Manual sort lets you arrange items exactly as you want, ignoring default orders.
  3. Final Answer:

    To arrange items in a custom order that is not alphabetical or numerical -> Option A
  4. Quick Check:

    Manual sort = Custom order [OK]
Hint: Manual sort = drag items to set exact order [OK]
Common Mistakes:
  • Confusing manual sort with automatic alphabetical sorting
  • Thinking manual sort filters data
  • Assuming manual sort creates calculations
2. Which of the following is the correct way to manually sort categories in Tableau?
easy
A. Sort by the sum of sales automatically
B. Use the filter shelf to reorder items
C. Create a calculated field with numeric ranks
D. Right-click the field, select 'Sort', then drag items in the sort dialog

Solution

  1. Step 1: Locate manual sort option

    Manual sort is done by right-clicking the field and choosing 'Sort'.
  2. Step 2: Use drag-and-drop in sort dialog

    In the sort dialog, you drag items to reorder them manually.
  3. Final Answer:

    Right-click the field, select 'Sort', then drag items in the sort dialog -> Option D
  4. Quick Check:

    Manual sort = Right-click + drag in sort dialog [OK]
Hint: Right-click field > Sort > drag items to reorder [OK]
Common Mistakes:
  • Trying to reorder items in filter shelf
  • Using calculated fields instead of manual sort
  • Relying on automatic sum sorting
3. Given categories: A, B, C, D. You manually sort them in this order: D, B, A, C. What will be the order shown in the view?
medium
A. A, B, C, D
B. B, A, C, D
C. D, B, A, C
D. C, A, B, D

Solution

  1. Step 1: Understand manual sort order effect

    Manual sort overrides default sorting and shows items in the specified order.
  2. Step 2: Apply given manual order

    The order set is D, B, A, C, so Tableau will display categories exactly in this sequence.
  3. Final Answer:

    D, B, A, C -> Option C
  4. Quick Check:

    Manual sort order = D, B, A, C [OK]
Hint: Manual sort shows exactly the order you set [OK]
Common Mistakes:
  • Assuming alphabetical order overrides manual sort
  • Confusing manual sort with default sorting
  • Ignoring the manual order set
4. You tried to manually sort categories but the order did not change in the view. What is the most likely reason?
medium
A. The field is sorted by a measure overriding manual sort
B. You forgot to apply the manual sort after dragging items
C. Manual sort only works on numeric fields
D. You need to refresh the data source

Solution

  1. Step 1: Check sorting conflicts

    If a measure-based sort is applied, it overrides manual sorting.
  2. Step 2: Identify override cause

    Sorting by a measure like sum or average will ignore manual order settings.
  3. Final Answer:

    The field is sorted by a measure overriding manual sort -> Option A
  4. Quick Check:

    Measure sort overrides manual sort [OK]
Hint: Check if measure sorting overrides manual sort [OK]
Common Mistakes:
  • Assuming manual sort applies without removing other sorts
  • Thinking manual sort only works on numbers
  • Forgetting to refresh data
5. You have product categories: 'Low', 'Medium', 'High'. You want to show them in the order: 'Medium', 'High', 'Low'. How do you achieve this manual sort in Tableau?
hard
A. Sort the categories alphabetically and rename them
B. Right-click the category field, select 'Sort', choose 'Manual', then drag 'Medium' first, 'High' second, 'Low' last
C. Create a calculated field assigning numbers: Medium=1, High=2, Low=3, then sort by this field
D. Filter out 'Low' and sort remaining categories

Solution

  1. Step 1: Use manual sort dialog

    Right-click the category field and select 'Sort' to open manual sort options.
  2. Step 2: Drag categories in desired order

    Drag 'Medium' first, then 'High', then 'Low' to set the custom order.
  3. Step 3: Apply and verify order in view

    Apply the manual sort and check that categories appear as 'Medium', 'High', 'Low'.
  4. Final Answer:

    Right-click the category field, select 'Sort', choose 'Manual', then drag 'Medium' first, 'High' second, 'Low' last -> Option B
  5. Quick Check:

    Manual sort drag order sets display order [OK]
Hint: Drag categories in manual sort dialog to set order [OK]
Common Mistakes:
  • Trying alphabetical sort instead of manual
  • Using calculated fields unnecessarily
  • Filtering out categories instead of sorting
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard