Skip to main content

Command Palette

Search for a command to run...

Power BI: Performing Automatic Clustering

Updated
4 min read
Power BI: Performing Automatic Clustering
M

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

  1. Open Power BI Desktop.

  2. Select Home → Get Data → Excel.

  3. Choose the file powerbi_ui_example.xlsx.

  4. In the Navigator window, select:

    • Sales

    • Products

  5. Click Load.

Step 2 – Build Relationships

  1. Go to Model view (third icon on the left panel).

  2. Ensure there’s a relationship between:

    • Sales[ProductID]Products[ProductID]
  3. If not, create one by dragging one field onto the other.

Step 3 – Create a Scatter Chart

  1. Switch to Report view.

  2. From the Visualizations pane, select the Scatter Chart icon.

  3. 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):

FieldLocationSource TableDescription
Product_NameDetailsProductsEach bubble represents one product
(leave empty)LegendWe will add clusters later
QuantityX-AxisSalesHorizontal axis: quantity sold
RevenueY-AxisSalesVertical axis: total revenue
RevenueSizeSalesControls bubble size

Steps:

  1. Drag Product_NameDetails.

  2. Drag QuantityX Axis.

  3. Drag RevenueY Axis.

  4. Drag RevenueSize.

You’ll now see a scatter plot with each product as a blue bubble.

Step 5 – Open Clustering Option

  1. Click on the Scatter Chart to make sure it’s selected.

  2. At the top-right of the chart, click the More options (⋯) button (label 2 in the image).

  3. 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):

FieldDescriptionExample
1. NameEnter a meaningful name for your clusters.Product Clusters
2. FieldConfirms the field used for clustering.Product_Name
3. Number of clustersSpecify 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:

  1. A new field named Product Clusters appears under the Products table in the Fields pane (label 1 in the third image).

  2. Drag Product ClustersLegend (label 2).

  3. 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

  1. Click the Format (paint roller) icon.

  2. 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

  1. Click File → Save As.

  2. Name it “Product_Clustering_Analysis.pbix”.

27 views