Why Is My Scatterplot a single point? (Tableau Troubleshooting)

,

The “Show Me” pane in Tableau makes it look like building a scatterplot should be so easy – just drag in 2-4 measures, click the chart type, and you should be good to go! But often when you follow these steps, you’ll end up with a single sad dot in a corner.

Why does this happen, and how do you fix it? This is the first post in my new “Tableau Troubleshooting” series, where we’ll walk through some of Tableau’s less intuitive quirks, explain why they happen, and dig into the solutions.

Alright, let’s dive in! In the screenshot below, I’ve tried to create a scatterplot of sales vs profit by adding the “Sales” measure to the columns shelf, and the “Profit” measure to the row shelf. I have the scatterplot chart type selected in “Show Me”, but my scatterplot is just a single dot!

The reason that this happens can be seen in the measure pills:

Notice how both of the measures have been automatically aggregated using “SUM”?

The reason that we only see a single point here is that Tableau has rolled up our data to the highest level available – it’s taken every single sales number and every single profit number and summed them up into a single point.

This is the default behavior when we create a chart in Tableau. Unless we specify a lower level of detail (we’ll talk more about that in a minute), Tableau will use the highest level available. In this case, because we haven’t specified that we want anything more detailed than “the whole total”, we only have one point.

Let’s fix this! There’s two options – the first is quicker but we lose a lot of control, while the second is the “right way” because it lets us specify exactly what we want to see. (I usually recommend option 2, because keeping control is typically better for your process and the outcome; however, option 1 is also valid as long as you fully understand the tradeoff).

Option 1 (The quick Fix)

Let’s start with the fastest solution to this problem. Click the arrow on one of the measure pills, and change from “measure” to “dimension”.

Repeat with the other measure. You’ll see a beautiful scatterplot!

So why did this fix the problem?

When we changed the pills from measures to dimensions, we told Tableau that we want it to treat “Sales” and “Profits” like dimensions. Dimensions can’t be aggregated – we can’t sum them or average them – which means that Tableau stops trying to aggregate all our points to the highest level.

Instead, every row in the data source gets its own dot. That means we have a scatterplot where each dot represents one row. In my data, each row represents one sale, so each dot on this scatterplot is one sale.

Maybe that’s exactly what you want! In that case, this “quick fix” can be a perfectly fine solution. If you always want one dot per row, and you know that’s not going to change, it’s fine to use this option. (As long as you’re clear about what it means you’re getting).

However, we lose a lot of control here because each dot is always one row – we can’t change it. If I wanted each dot to represent one full order, or one customer, or one state, I couldn’t do that. I can only display the deepest level of detail (the row level) with this fix.

If you need (or want) more control over what’s displayed, read on to Option 2.

Option 2: The “Right” Way

Now let’s look at the “right” way to solve this problem – it requires a bit more thought, but allows you to keep full control over exactly what’s being displayed. (In my opinion, this is usually the best way to go).

I reset my scatterplot back to using measures, and we’re right back where we started – a single dot, aggregated to include all of our data.

If we want to split the data to a lower level of detail, all we need to do is specify what level of detail we want. This will tell Tableau exactly what we want each dot on the scatterplot represent.

Let’s say that I want to have each dot represent one order. One of the fields in my data is Order ID, and each Order ID represents one order. Let’s drag the Order ID field to the “Details” shelf and see what happens:

Beautiful! Another scatterplot! You’ll notice that it looks slightly different from the scatterplot we created in Option 1. That’s because now each dot represents one Order ID, instead of one row in the data set. They’re similar – one row in this set often is the same as one order – but not identical.

Here’s another example – maybe I want each dot to represent a state in my dataset, and include all the orders from that state. This is nice and easy! All I have to do is swap out the field on my “Detail” shelf with State.

Now I have far fewer dots, because each one is representing a state.

One more thing to consider here is how you want to aggregate the data. The default for most fields is “Sum”, as you can see on the measures in the rows and columns shelves. That means that our scatterplot is plotting the Sum of Sales vs Sum of Profits for each states. But maybe instead you want to show the Average Sales vs Average Profits.

No problem! All we need to do is adjust how the measures are being aggregated:

Click the dropdown arrow on each measure, and change the aggregation type under “Measure” to Average.

Now our scatterplot shows the average sales and average profit for each state:

One more thing to note: Sometimes the level of detail you want isn’t neatly summed up by a single ID field. In that case, you can add multiple fields to the “detail” shelf to make each dot represent exactly what you want.

For example, if I wanted each dot to represent a state and category combination (ie: one dot for “Chairs sold in Utah”, one dot for “Office Supplies sold in Utah”, one dot for “Chairs sold in Oregon”, etc), I could add the category field to details in addition to state.

It’s also worth noting that any fields you add to the color, size, or shape shelves will also be used to set the detail level of the scatterplot. For example, if I remove all fields from the detail shelf but put “State” on color, I’ll still get one dot per state. (And they’ll also all be different colors!)

(Please don’t make this chart. This is a bad chart.)

Conclusion

And that’s it! To sum up:

  • When you make a scatterplot in Tableau, it will automatically aggregate to the highest level of detail and give you just one point that includes all your data.
  • You can make Tableau show you one dot for each row in your data source by changing the pills from measures to dimensions, but this isn’t the best option unless you are certain that you’ll always want exactly one dot per row.
  • A better option is to specify what level of detail you want to show on your scatterplot (ie: what you want each dot to represent) by adding those fields to the detail shelf. (Or the color, size, or shape shelves).

Enjoy your beautiful scatterplots!

If you found this post helpful, be sure to subscribe down at the bottom of the page to get future posts in this series as they come out.

Let’s keep in touch! New tips, tricks, and tutorials are posted about once a week – sign up to get them straight to your inbox!

I don’t spam! Read the privacy policy for more info.

Leave a Reply

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