# Sorting, reference lines and totals

*Tableau Desktop Foundations Study Guide · Exploring and Analyzing Data · Last updated October 29, 2026 · https://www.certifyforce.com/study-guide/tableau-desktop-foundations/exploring-and-analyzing-data/sorting-reference-lines-and-totals*

Sort a view by clicking, dragging or the Sort dialog (Data Source Order, Alphabetic, Field, Manual, Nested), clear sorts, add a reference line to a continuous axis with the right computation and label, and show grand totals and subtotals where readers need them.

- Certification: Salesforce Tableau Desktop Foundations
- Exam section: Exploring and Analyzing Data
- Study guide: https://www.certifyforce.com/study-guide/tableau-desktop-foundations

**Official exam objective:**

> Apply analytics to a worksheet: Add a manual or a computed sort; Add a reference line; Use a quick table calculation; Use bins and histograms; Create a calculated field (for example, string, date, simple arithmetic); Explain when to use a parameter; Display totals on a worksheet.

## What the exam expects

- Add a computed sort (axis, header, field label or toolbar icons, or the Sort dialog) and a manual sort (drag a header, or Manual in the Sort dialog).
- Pick the Sort By option for a requirement: Data Source Order, Alphabetic, Field, Manual or Nested, including sorting by a field that isn't in the view.
- Clear one sort or every sort in the view without removing fields.
- Add a reference line from the Analytics pane, choose its computation and label, and explain why some views can't take one.
- Display grand totals and subtotals, and move them to the top or left of the view.

Key terms:
- **Computed sort:** an order Tableau calculates from data, such as descending by a measure.
- **Manual sort:** an order you set by dragging members or moving them in the Sort dialog.
- **Nested sort:** a sort that considers each pane independently.
- **Reference line:** a line at a constant or computed value on a continuous axis.
- **Grand total / subtotal:** a total for the whole row or column / for each partition of an outer dimension.

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Field sort | Sorting field doesn't need to be in the view | [Sort Data in a Visualization](https://help.tableau.com/current/pro/desktop/en-us/sortgroup_sorting_computed_howto.htm) |
| Alphabetic sort | Case sensitive; digits individually, 19 before 2 | [Sort Data in a Visualization](https://help.tableau.com/current/pro/desktop/en-us/sortgroup_sorting_computed_howto.htm) |
| Data Source Order (relational) | Generally natural sort order, 2 before 19 | [Sort Data in a Visualization](https://help.tableau.com/current/pro/desktop/en-us/sortgroup_sorting_computed_howto.htm) |
| Clear all sorts | Worksheet > Clear > Sorts, or Clear Sorts next to Clear Sheet | [Sort Data in a Visualization](https://help.tableau.com/current/pro/desktop/en-us/sortgroup_sorting_computed_howto.htm) |
| Show Sort Controls | Hides sort icons; doesn't remove sorts | [Sort Data in a Visualization](https://help.tableau.com/current/pro/desktop/en-us/sortgroup_sorting_computed_howto.htm) |
| Reference line placement | Any continuous axis | [Reference Lines, Bands, Distributions, and Boxes](https://help.tableau.com/current/pro/desktop/en-us/reference_lines.htm) |
| Reference line computations | Total, Sum, Constant, Minimum, Maximum, Average, Median | [Reference Lines, Bands, Distributions, and Boxes](https://help.tableau.com/current/pro/desktop/en-us/reference_lines.htm) |
| Subtotals | Drop Totals on Subtotals in the Analytics pane | [Show Totals in a Visualization](https://help.tableau.com/current/pro/desktop/en-us/calculations_totals_grandtotal_turnon.htm) |
| Column grand totals | Bottom by default; Column Totals to Top moves them | [Show Totals in a Visualization](https://help.tableau.com/current/pro/desktop/en-us/calculations_totals_grandtotal_turnon.htm) |

## Check yourself

- Why does dragging an item on a legend change the view, not just the legend?
- When does a sort order each pane independently?
- What must a view have before it can show grand totals?
- What does a third click on a single-click sort icon do?

## Sources

- [Sort Data in a Visualization](https://help.tableau.com/current/pro/desktop/en-us/sortgroup_sorting_computed_howto.htm)
- [Reference Lines, Bands, Distributions, and Boxes](https://help.tableau.com/current/pro/desktop/en-us/reference_lines.htm)
- [Show Totals in a Visualization](https://help.tableau.com/current/pro/desktop/en-us/calculations_totals_grandtotal_turnon.htm)
- [Build a Bar Chart](https://help.tableau.com/current/pro/desktop/en-us/buildexamples_bar.htm)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 8 linked practice questions, and unlimited timed mock exams are included with the Tableau Desktop Foundations pack (USD $19): https://www.certifyforce.com/practice-exams
