BI & Analytics
Blog
Tableau
5
min read

How to Show and Hide Outliers on a Scatter Plot in Tableau

Build a Tableau scatter plot that lets users show all data, exclude outliers, or show only outliers — using standard deviation and a parameter filter.
Author
Katie Liddle
Katie Liddle
Analytics Engineer
How to Show and Hide Outliers on a Scatter Plot in Tableau
Share article

To show and hide outliers on a Tableau scatter plot, calculate upper and lower limits using three standard deviations from the mean (via a level of detail expression), flag each point as an outlier or not, then build a three-option parameter — Show All, Exclude Outliers, Show Only Outliers — that drives a filter calculation. The result is one scatter plot, three views, and full user control over how outliers affect the visualisation.

Let's dig deeper...

What are outliers in data analysis?

And outlier is a data point that falls far enough outside the typical range of values that it distorts the visualisation or analysis of the rest of the data. The most common statistical definition is any value more than three standard deviations from the mean — the so-called "three-sigma rule," which captures roughly 99.7% of normally distributed data inside the limits.

That leaves about 0.3% of points classified as outliers. In practice on a scatter plot, those few extreme points often dominate the view: axes stretch to accommodate them, and the meaningful cluster in the middle compresses into an unreadable blob.

Other common definitions you'll see in Tableau workflows:

  • Two standard deviations: stricter, flags about 5% of points as outliers
  • Interquartile range (IQR): based on the middle 50% of data, more robust to extreme values
  • Z-score thresholds: typically flagging anything with an absolute Z-score above 2 or 3

For most business dashboards, three standard deviations strikes the right balance: it catches genuinely anomalous values without flagging too much of the normal variation in your data.

This guide uses the three-sigma approach, but the technique works with any threshold you choose.

Why Hide Outliers (and Why Show Them Anyway)?

Outliers aren't automatically bad data — they're just unusual data, and how you handle them depends on the story you're telling.

Hide outliers when:

  • A handful of extreme values is stretching your axes and making the main cluster unreadable
  • You want to show typical performance, not exceptions
  • Outliers are likely data quality issues (a $1M sale that was actually a data entry error)
  • Stakeholders are getting distracted by outliers and missing the broader pattern

Show only outliers when:

  • The exceptions are the story (your highest-value customers, fraud detection, equipment anomalies)
  • You're running root-cause analysis on unusual events
  • You want a "what's worth investigating?" view alongside the main dashboard

Show all values when:

  • You're providing the full picture for stakeholders to make their own judgement
  • Outliers are legitimate edge cases that belong in the analysis
  • Transparency matters more than visual cleanliness

Giving users all three options in one chart — rather than picking for them — respects that the right answer depends on what they're trying to learn. That's exactly what this build delivers.

How to show or hide outliers on a Tableau scatter plot

Step 1: Build the Base Scatter Plot

Start with the standard scatter plot setup:

  1. Drag Sales to Columns.
  2. Drag Profit to Rows.
  3. Drag a dimension (e.g. Customer Name, Product Name, or Sub-Category) to the Detail mark on the Marks card. This breaks the measures down so you see one point per dimension value rather than one aggregated point.
  4. Set the mark type to Circle.

You now have a working scatter plot. Look at it carefully — chances are a few extreme points in the top-right or bottom-right corners are pulling your axes and squashing everything else into a tight cluster. Those are your outliers.

The choice of dimension on Detail matters for the next step. If you drop a dimension on Detail, every measure on the view is aggregated to that dimension — and your outlier calculation needs to match that aggregation level. Keep this in mind for Step 2.

Step 2: Calculate the Upper and Lower Limits

To classify each point as an outlier or not, you need to know what the "normal" range looks like. That means calculating the mean (average) and the standard deviation, then defining the upper limit as mean + (3 × standard deviation) and the lower limit as mean − (3 × standard deviation).

How you calculate these depends on whether your scatter plot uses aggregated measures (with a dimension on Detail) or row-level data.

When your data is aggregated to a dimension (FIXED LOD)

If you've put a dimension on the Detail mark — say, Customer Name — every point on the scatter plot represents that customer's total Sales and total Profit. Your outlier calculation needs to compute the mean and standard deviation of those aggregated values, not the row-level transactions underneath.

This is where FIXED level of detail expressions come in. A FIXED LOD computes a value at a specific dimension level, regardless of what's on the view.

For Sales, create these two calculated fields:

Sales Upper Limit:
{ AVG( { FIXED [Customer Name] : SUM([Sales]) } ) }
+ 3 *
{ STDEV( { FIXED [Customer Name] : SUM([Sales]) } ) }
Sales Lower Limit:
{ AVG( { FIXED [Customer Name] : SUM([Sales]) } ) }
- 3 *
{ STDEV( { FIXED [Customer Name] : SUM([Sales]) } ) }

The inner FIXED expression rolls Sales up to one value per customer. The outer AVG and STDEV then compute the average and standard deviation across all those customer totals.

Wrapping everything in { } makes the final result a single number that applies to the whole view.

Repeat for Profit:

Profit Upper Limit:
{ AVG( { FIXED [Customer Name] : SUM([Profit]) } ) }
+ 3 *
{ STDEV( { FIXED [Customer Name] : SUM([Profit]) } ) }
Profit Lower Limit:
{ AVG( { FIXED [Customer Name] : SUM([Profit]) } ) }
- 3 *
{ STDEV( { FIXED [Customer Name] : SUM([Profit]) } ) }

Substitute your dimension for [Customer Name] if you're using something different.

When you're working with row-level data (no FIXED needed)

If your scatter plot uses row-level data — one mark per record, no dimension aggregating things — the calculations are simpler because you don't need to roll anything up first.

Sales Upper Limit (row-level):
{ AVG([Sales]) } + 3 * { STDEV([Sales]) }
Sales Lower Limit (row-level):
{ AVG([Sales]) } - 3 * { STDEV([Sales]) }

Repeat the pattern for Profit. The outer { } brackets still apply the result to the whole view, but you skip the inner FIXED because every row is already the right level of detail.

If you only care about high outliers, you can skip the lower limit. If you only care about low outliers, skip the upper limit. Most cases want both.

Step 3: Flag the Outliers

Now combine the limits into a single Boolean field that returns True if a point is an outlier on either measure.

For the aggregated case:

Is Outlier?:
SUM([Sales]) > [Sales Upper Limit]
OR SUM([Sales]) < [Sales Lower Limit]
OR SUM([Profit]) > [Profit Upper Limit]
OR SUM([Profit]) < [Profit Lower Limit]

For row-level data, drop the SUM aggregations and compare the raw fields directly:

Is Outlier? (row-level):
[Sales] > [Sales Upper Limit]
OR [Sales] < [Sales Lower Limit]
OR [Profit] > [Profit Upper Limit]
OR [Profit] < [Profit Lower Limit]

The OR logic means a point only needs to be extreme on one measure to be flagged. This is usually what you want — a customer with normal sales but wildly negative profit is still an outlier worth knowing about.

To test the calculation, drag Is Outlier? to the Color mark. Your scatter plot should now show normal points in one colour and outliers in another. If the colours roughly match the points your eye picks out as extreme, the logic is working.

Step 4: Build the Show / Hide / Only Parameter

The user-facing control is a parameter with three options.

  1. In the Data pane, click the dropdown next to the search bar and choose Create Parameter.
  2. Name it Outlier View.
  3. Set Data type to Integer (slightly faster than String; the integer values map to display labels in the next step).
  4. Set Allowable values to List.
  5. Add three rows:
    • Value 1, Display As Show all values
    • Value 2, Display As Exclude outliers
    • Value 3, Display As Show only outliers
  6. Click OK.

Right-click the parameter in the Data pane and choose Show Parameter so users can interact with it from the dashboard.

Step 5: Create the Filter Calculation and Apply It

The parameter on its own does nothing — you need a calculated field that reads the parameter, checks the Is Outlier? flag, and returns True for any point that should be visible.

Create a calculated field called Outlier Filter:

CASE [Outlier View]
    WHEN 1 THEN TRUE
    WHEN 2 THEN NOT [Is Outlier?]
    WHEN 3 THEN [Is Outlier?]
END

The logic:

  • When the user picks Show all values (1), every point returns True and stays visible.
  • When the user picks Exclude outliers (2), only points where Is Outlier? is False stay visible.
  • When the user picks Show only outliers (3), only points where Is Outlier? is True stay visible.

Drag Outlier Filter to the Filters shelf and set it to True only.

Toggle through the three parameter options. The scatter plot should redraw each time: full view, cleaned-up view, exception-only view.

A few finishing touches worth applying:

  • Apply the filter to related sheets. If the scatter plot is part of a dashboard with other charts that should respect the same outlier selection, right-click the filter and choose Apply to Worksheets > Selected Worksheets.
  • Add reference bands for the upper and lower limits using the Analytics pane. Drag the limit calculated fields onto Detail first so they're available as reference values.
  • Colour-code outliers even when they're shown. Keep Is Outlier? on Color so users instantly see which points are flagged, even in the "Show all" view.
Facts & figures

About client

Testimonial