Tableau Sorting and Grouping

Raw charts often display data in an unhelpful default order — alphabetical or the order data was entered. Sorting and grouping give you control over how data is arranged and organized so your charts tell a clear story.

Sorting

Sorting rearranges the items in your chart from highest to lowest, or lowest to highest, based on a value you choose.

Quick Sort

Click any axis label or header in your chart. Small sort arrows appear at the top of the column or end of the axis. Click once to sort ascending. Click again to sort descending. Click a third time to return to the default order. This is the fastest way to sort.

Toolbar Sort Buttons

The Tableau toolbar has two sort buttons — one for ascending (A→Z or low→high) and one for descending (Z→A or high→low). Select the field you want to sort on first, then click the button. The chart reorders instantly.

Diagram: Before and After Sorting

Before Sort (alphabetical):
Category    | Sales
Central     | 900
East        | 1,300
South       | 700
West        | 1,100

After Sort Descending by Sales:
Category    | Sales
East        | 1,300   ← highest
West        | 1,100
Central     | 900
South       | 700     ← lowest

Manual Sort

Sometimes alphabetical and value-based orders both fail your purpose. For example, you might want months in a custom order for a fiscal year that starts in April. Right-click the field on the Rows or Columns shelf, select "Sort," then choose "Manual." Drag items in the list to any order you want.

Custom Month Order Example

Fiscal Year starting in April:
Apr → May → Jun → Jul → Aug → Sep → Oct → Nov → Dec → Jan → Feb → Mar

Nested Sort

When your chart has multiple levels of Dimensions, you can sort within each group independently. Right-click the innermost field header and sort. Tableau sorts each category separately rather than sorting the entire axis together.

Groups

Groups combine multiple Dimension members into a single named bucket. If your data has 50 cities and you want to combine them into 5 regions you define yourself, groups do this without changing the original data.

Creating a Group

  1. In the view, hold Ctrl and click the items you want to combine
  2. Click the paperclip icon that appears, or right-click and select "Group"
  3. Tableau creates a new grouped Dimension field in the Data Pane
  4. Double-click the group name to rename it

Diagram: Grouping Cities into Zones

Before Grouping:
Chicago, Detroit, Cleveland, Indianapolis, Milwaukee, Columbus

After Grouping — Midwest Zone:
+----------------------------+
|   Midwest Zone             |
|   Chicago                  |
|   Detroit                  |
|   Cleveland                |
|   Indianapolis             |
|   Milwaukee                |
|   Columbus                 |
+----------------------------+

The grouped field appears in the Data Pane with a paperclip icon. You can drag it to charts just like any other Dimension.

Editing a Group

Right-click the grouped field in the Data Pane and select "Edit Group." The group editor opens. Add or remove members, rename groups, and create new groups — all without touching the original data.

The "Other" Category in Groups

When you create groups, all ungrouped items automatically collect into a bucket called "Other." You can rename "Other" to anything meaningful, or you can assign all remaining items to a specific group. The group editor has a checkbox to "Include 'Other'" — uncheck it to hide ungrouped items from the view.

Hierarchy Levels and Drill Down

Tableau automatically creates date hierarchies — Year > Quarter > Month > Week > Day. You see a small plus icon on date fields in the view. Click the plus to drill down to a finer level. Click the minus to roll back up. You can also create custom hierarchies for non-date fields.

Creating a Custom Hierarchy

In the Data Pane, drag one Dimension on top of another. Tableau asks if you want to create a hierarchy. Give the hierarchy a name. For example, drag City onto State, then State onto Region to create a Region > State > City hierarchy. Viewers can then drill from Region level down to individual cities.

Bins (Grouping Numbers into Ranges)

Bins group continuous numbers into equal-width buckets. For example, instead of showing every individual order by exact sales amount, you group them into $0–$100, $100–$200, $200–$300 buckets. This turns a messy scatter into a readable histogram.

Creating a Bin

  1. Right-click a Measure in the Data Pane
  2. Select "Create" → "Bins"
  3. Set the bin size (e.g., 100 for every $100)
  4. Drag the new bin field to Columns and the count to Rows

Summary

Sorting rearranges chart items by value, alphabetically, or manually. Groups combine Dimension members into custom categories you define. Hierarchies let viewers drill from broad levels to detailed levels. Bins group numbers into equal ranges for distribution analysis. All of these controls live in the Data Pane or right-click menus — no code required.

Leave a Comment

Your email address will not be published. Required fields are marked *