Sub topic 8
Exploring relationships with scatter and bubble charts
A scatter chart answers one question: do two numbers move together? It plots each item as a point, with one measure on the X axis and another on the Y axis. A bubble chart adds a third measure as the size of each point.
This chapter assumes you know how to drag fields into the field wells and can write a simple DAX measure. It builds on the earlier chapters on field types and measures.
When a scatter chart fits
Use a scatter chart when the question is about a relationship between two measures. Examples:
- Do products with higher prices sell fewer units?
- Do stores with more staff earn more revenue?
- Which customers have high sales but low profit margin?
Both axes must be numeric. The points represent a category, such as a product or a store, so you also need one categorical field to say what each point is.
Setting up the field wells
The key field is Values. It decides what one point stands for. If you leave it empty, Power BI aggregates everything into a single dot.
| Field well | What to put there | Example |
|---|---|---|
| Values | The category that defines each point | Product[ProductName] |
| X Axis | A numeric measure | [Total Sales] |
| Y Axis | A numeric measure | [Profit Margin %] |
| Size | A third numeric measure (makes it a bubble chart) | [Order Count] |
| Legend | A category that colors the points | Product[Category] |
Define the measures first. Here is a margin measure to use on the Y axis, with the base measure from the earlier chapter:
Total Sales = SUM ( Sales[SalesAmount] )
Total Cost = SUM ( Sales[TotalCost] )
Profit Margin % =
DIVIDE ( [Total Sales] - [Total Cost], [Total Sales] )DIVIDE returns blank instead of an error when sales are zero. Points with a blank value are not drawn.
Reading the chart
Look at the overall pattern first. Points rising from lower left to upper right suggest a positive relationship. A downward slope suggests a negative one. A shapeless cloud suggests no clear link. Then look for outliers, which are points far from the rest. These are often the most useful finding.
To add a guide, open the Analytics pane and add a trend line. In newer versions you can also add average lines for each axis, which split the chart into four zones.
Common errors
- Too many points. With thousands of overlapping points, the chart becomes a blob. Filter to a top N, or aggregate at a higher level, such as category instead of product.
- Bubble size misread. People judge bubble area poorly. Use size only for a rough third dimension. If exact values matter, use a table.
- Assuming cause. A relationship does not show that one measure causes the other.
- Ignoring axis scale. One extreme outlier can squash everything else. Check the axis range, or consider a log scale if values span orders of magnitude.
Exercise
A manager asks which product categories have high sales but low profit margin. Which visual and field wells would you use, and why?
Show answer
Use a scatter chart with Product[Category] in Values, [Total Sales] on the X axis and [Profit Margin %] on the Y axis. Categories at the right and low on the chart are the high-sales, low-margin ones. Optionally add [Order Count] to Size to make it a bubble chart.