Power BI: Performing Automatic Clustering

Mohamad's interest is in Programming (Mobile, Web, Database and Machine Learning). He is studying at the Center For Artificial Intelligence Technology (CAIT), Universiti Kebangsaan Malaysia (UKM).
Clustering is a machine learning technique that groups similar data points together based on patterns or relationships within the dataset. In Power BI, clustering allows you to automatically segment your data into meaningful groups without manually defining the boundaries.
In this exercise, you’ll use Automatic Clustering on a Scatter Chart that plots Quantity vs. Revenue by Product_Name.
The goal is to:
Identify groups of products with similar sales and revenue performance.
Visually differentiate clusters to support strategic decisions (e.g., identifying high-performing, average, and low-performing product groups).
Download https://archive.org/download/powerbi_dataset/powerbi_ui_example.xlsx
Step 1 – Load the Dataset
Open Power BI Desktop.
Select Home → Get Data → Excel.
Choose the file
powerbi_ui_example.xlsx.In the Navigator window, select:
SalesProducts
Click Load.
Step 2 – Build Relationships
Go to Model view (third icon on the left panel).
Ensure there’s a relationship between:
- Sales[ProductID] → Products[ProductID]
If not, create one by dragging one field onto the other.
Step 3 – Create a Scatter Chart
Switch to Report view.
From the Visualizations pane, select the Scatter Chart icon.
Resize it to occupy the center area of the report canvas.
Step 4 – Add Data Fields
In the Visualizations pane, assign the following fields (refer to the first image):
| Field | Location | Source Table | Description |
| Product_Name | Details | Products | Each bubble represents one product |
| (leave empty) | Legend | — | We will add clusters later |
| Quantity | X-Axis | Sales | Horizontal axis: quantity sold |
| Revenue | Y-Axis | Sales | Vertical axis: total revenue |
| Revenue | Size | Sales | Controls bubble size |
Steps:
Drag Product_Name → Details.
Drag Quantity → X Axis.
Drag Revenue → Y Axis.
Drag Revenue → Size.
You’ll now see a scatter plot with each product as a blue bubble.
Step 5 – Open Clustering Option
Click on the Scatter Chart to make sure it’s selected.
At the top-right of the chart, click the More options (⋯) button (label 2 in the image).
From the dropdown menu, select Automatically find clusters (label 3).
Power BI will open the Clusters dialog box.
Step 6 – Configure Clustering Parameters
In the Clusters dialog box (as shown in the second image):
| Field | Description | Example |
| 1. Name | Enter a meaningful name for your clusters. | Product Clusters |
| 2. Field | Confirms the field used for clustering. | Product_Name |
| 3. Number of clusters | Specify how many groups Power BI should create. | 3 |
You can optionally add a short description like “Clusters for Product_Name based on Quantity and Revenue.”
Click OK when done.
Step 7 – Display Clusters in the Chart
After Power BI creates the clusters:
A new field named Product Clusters appears under the Products table in the Fields pane (label 1 in the third image).
Drag Product Clusters → Legend (label 2).
The Scatter Chart now automatically colors bubbles according to cluster membership:
Cluster 1 (e.g., High-performing products)
Cluster 2 (Medium-performing products)
Cluster 3 (Low-performing products)
Step 8 – Format the Chart
Click the Format (paint roller) icon.
Update:
Title: “Quantity, Revenue, and Product Clusters”
Data Colors: Choose distinct colors for each cluster.
Background: Light color for clarity.
Data Labels (optional): Turn On to display product names.
Step 9 – Analyze the Result
Cluster 1 (e.g., large bubbles on top-right): High-quantity and high-revenue products.
Cluster 2 (middle zone): Medium-performing products.
Cluster 3 (bottom-left): Low-quantity and low-revenue products.
This helps identify which groups of products are driving performance and which need attention.
Step 10 – Save the Report
Click File → Save As.
Name it “Product_Clustering_Analysis.pbix”.