Tableau Clustering
Clustering sorts records into groups that behave alike. Tableau finds the groups automatically, so you do not need to write formulas or code. Retailers group customers by buying habits, and schools group students by performance patterns.
The Layman's View
Picture a school hall full of people. Ask everyone to stand near others who share similar interests. Groups form naturally: sports fans in one corner, music fans in another. Clustering does the same job with numbers.
Before Clustering After Clustering . . . . . . Cluster 1: . . . . . . . . Cluster 2: . . . . . . . . Cluster 3: . . . Unsorted points Three groups with colors
How Tableau Clusters Data
Tableau uses the k-means algorithm. The algorithm picks center points, assigns each record to the nearest center, and moves centers until groups settle. Records inside one cluster look similar, and records in different clusters look different.
Build a Cluster Step by Step
Step 1: Create a Scatter Plot
Drag Sales to Columns and Profit to Rows. Drag Customer Name to Detail on the Marks card so each dot represents one customer.
Step 2: Open the Analytics Pane
Click the Analytics tab beside the Data tab in the left panel.
Step 3: Drag Cluster Into the View
Drag Cluster from the Model section onto the view and drop it on the Cluster target. Tableau colors the dots by group and shows a Clusters dialog.
Step 4: Set the Number of Clusters
Leave the number blank to let Tableau choose. Type a number, such as 4, to force a specific group count.
Choose the Input Variables
The Variables list in the Clusters dialog controls which fields shape the groups. Add fields such as Quantity or Discount to include more behavior. Remove fields that add noise. Tableau scales each variable so a large number field does not dominate.
Understand the Results
Right-click the Clusters pill in the Marks card, or open the Describe Clusters option. Two tabs appear.
- Summary: Shows cluster count, number of items in each cluster, and statistics for quality.
- Models: Shows averages of each variable for every cluster.
Cluster | Avg Sales | Avg Profit | Meaning -------------------------------------------------------- 1 | High | High | Star customers 2 | High | Low | Heavy discount buyers 3 | Low | High | Small but healthy 4 | Low | Low | Needs review
Save a Cluster as a Group
Drag the Clusters pill from the Marks card into the Data pane. Tableau saves the result as a group field. Rename the groups with plain labels, such as "Star Customers," and use them in other sheets.
A saved group stays fixed. Fresh data does not refresh it. Rebuild the cluster after major data updates.
Practical Use Cases
- Marketing teams group customers for targeted offers.
- Operations teams group stores by traffic and sales.
- Product teams group items by price and demand.
Limits to Remember
Clusters Describe Patterns, Not Reasons
A cluster shows that records look alike. The result does not explain why. Study each group and apply business knowledge to label it.
Results Can Vary
Different variable choices produce different groups. Compare several options and choose the setup that makes practical sense.
Clean Data Matters
Outliers and missing values distort groups. Review unusual records before running the model.
Summary
Clustering groups similar records through the k-means method. Build a scatter plot, drag Cluster from the Analytics pane, and choose the variables. Describe Clusters reveals the traits of each group, and saving the result as a group field makes it reusable. Label groups in plain language so readers act on the findings.
