How to Make a Box and Whisker Plot in Tableau
A box and whisker plot is one of the best ways to quickly see how your data is spread out, but they can look a little intimidating. This guide will walk you through creating one in Tableau, step by step, so you can easily spot trends, compare categories, and find outliers in your own datasets.
What Exactly is a Box and Whisker Plot?
Before building one, let's quickly break down what you're actually looking at. A box and whisker plot (or just a box plot) is a chart that shows the distribution of your data. Think of it as a condensed version of a histogram that makes it easy to compare multiple groups at once.
Imagine you’re looking at daily sales data for three different products. A box plot lets you see the sales performance for all three, side-by-side, in a single view.
Here are the key parts of every box plot:
- The "Box": This is the core of the plot. It represents the middle 50% of your data.
- The Median: Inside the box is a line representing the median (or the second quartile, Q2). This is the middle value of your dataset - half of your data points are above it, and half are below. It gives you a clear sense of the "typical" value.
- The "Whiskers": These are the lines that extend out from the top and bottom of the box. They show the data range outside the middle 50%. By default, Tableau's whiskers extend to the furthest data points that are within 1.5 times the IQR.
- Outliers: Any data points that fall outside the ends of the whiskers are shown as individual dots. These are your outliers - unusually high or low values that might be worth investigating. Was it a massive order? Or maybe a data entry error?
By looking at these simple shapes, you can immediately grasp the range, median, and spread of your data for different categories, all without getting lost in the details of a massive spreadsheet.
Data Prep: Getting Your Fields Ready for Tableau
The good news is that box plots don't require a lot of complex data prep. To create one, you typically need just two types of fields from your dataset:
- A Dimension: This is a categorical field that will split your data into groups. Each group will get its own box plot. For example: Product Category, Sales Region, Ad Campaign Name, Shipping Method.
- A Measure: This is a numerical field that you want to analyze the distribution of. For example: Sales, Order Value, Click-Through Rate, Session Duration.
Pretty much any standard dataset from sources like Shopify, Salesforce, or Google Analytics will already be in this format. For instance, if you export your sales data, you’ll have a column for "Product Type" (your dimension) and a column for "Price" (your measure).
If you don't have individual records and just have aggregated data (e.g., one row with the total monthly sales), a box plot won't work well, because it needs to see all the individual data points to calculate the quartiles and find an accurate median.
Step-by-Step Guide: Building Your First Box Plot in Tableau
Let's build a box plot using Tableau's sample "Superstore" dataset to see the distribution of Sales across different product Sub-Categories. If you have Tableau open, you can follow along.
1. Set Up Your Initial View
First, connect to the sample Superstore data source. Then, you need to place your chosen dimension and measure onto the shelves.
- Drag your dimension, Sub-Category, onto the Columns shelf.
- Drag your measure, Sales, onto the Rows shelf.
Tableau will likely default to showing you a bar chart, summing up the sales for each sub-category. That's perfectly fine, we're about to change it.
2. Select the Box Plot Chart Type
Now for the easiest part. Over in the top-right corner of your workspace, you’ll see the "Show Me" card. This card presents different chart types. Simply click on the box-and-whisker plot option (it looks like a little box with whiskers!).
Tableau will automatically reconfigure your view into a series of vertical marks - one for each Sub-Category. This doesn't look like a box plot just yet, but you're almost there.
3. Disaggregate Your Data to See the Points
To turn those vertical lines into proper box plots, Tableau needs to see all the individual data points, not just the aggregated sums. Currently, it's just showing you the range from the minimum to the maximum sale in each category.
To fix this, you need to add more detail. Drag your dimension, Sub-Category, from the Data pane onto the Detail card in the Marks pane (it's the area on the left side of your view).
Once you drop it on 'Detail', you might notice something is still not quite right. Your view is probably filled with tiny box plots, one for each and every data point. To get one single box plot per category, you need to take one more simple step.
- Go to the main menu at the top of the screen.
- Click on Analysis.
- Uncheck the option that says Aggregate Measures.
By unchecking this, you're telling Tableau to plot every single sale as an individual data point. The view will instantly transform, showing all the individual points with a box plot overlaid on top for each sub-category. All the individual circles represent each sale within that category, beautifully visualizing the density and distribution.
4. Optional: Changing the Plot's Orientation
If you prefer horizontal box plots over vertical ones, just click the Swap Rows and Columns button on the toolbar (it looks like two arrows pointing away from each other). This will move 'Sub-Category' to Rows and your sales axis to Columns.
How to Read and Customize Your Box Plot
You’ve done it! You now have a complete box plot. Hover your cursor over different parts of any plot - the box, whiskers, or median line - and a tooltip will pop up with the exact values for the Upper Hinge (Q3), Median (Q2), Lower Hinge (Q1), and more.
Here are a few ways to add more context and make your visualization even more insightful:
1. Adding Color for More Detail
You can add another layer of analysis with color. What if you wanted to see if the sales distribution changes based on the customer segment?
Just drag the Segment dimension onto the Color card in the Marks pane. Tableau will now create separate, color-coded box plots within each sub-category, allowing you to quickly compare how sales for "Consumer", "Corporate", and "Home Office" segments are distributed.
2. Filtering Your Data
Maybe you only care about sales in a specific region. Drag the Region dimension to the Filters shelf. A dialog box will appear. Select the region(s) you want to see, click OK, and your entire view will update to show only that data, recalculating all the box plots automatically.
3. Editing the Whiskers
As mentioned, Tableau's whiskers extend to data points within 1.5 times the interquartile range (IQR). This is a standard statistical method for identifying mild outliers.
In most business cases, this default setting is perfect. But if you have a specific reason to change it, you can.
- Right-click on the quantitative axis (in our example, the Sales axis).
- Select Edit Axis.
- In the new dialog box, switch to the Box Plot section.
- Here, you can change the "Whisker extends to" setting. You can set it to the maximum extent of the data or to a specific percentile. For most use-cases, sticking with the default is recommended.
Real-World Examples of a Box Plot in Action
Box plots are useful well beyond sample datasets. Here are a few practical ways you could use them in marketing, sales, or e-commerce analytics:
- Comparing Ad Campaigns: Plot the 'Cost Per Click' (CPC) as your measure and 'Campaign Name' as your dimension. You can quickly see which campaigns have consistently low CPCs (a short box close to the bottom) and which ones are more unpredictable with lots of outliers.
- Analyzing Sales Performance: Use 'Deal Size' as the measure and 'Sales Rep' as the dimension. This lets you compare the consistency of your sales team. Does one rep have a tight box, meaning they consistently close deals of a similar size? Does another have a very tall box with long whiskers, indicating highly variable deal sizes?
- Understanding User Engagement: In Google Analytics, look at 'Session Duration' as your measure and 'Traffic Source' as your dimension. You’ll see not just the average time-on-site, but the actual distribution. Maybe Organic Search has a high median duration, but lots of low-value 'outlier' sessions that bounce immediately, which a simple average would hide.
Final Thoughts
Box and whisker plots are a powerful tool for understanding data distribution at a glance, and Tableau makes creating them surprisingly painless once you know the steps. By putting a dimension on one axis, a measure on the other, using the "Show Me" menu, and disaggregating your data, you can build an incredibly insightful visualization in just a few clicks.
While creating reports like this in Tableau is a huge step up from manual spreadsheet work, the process of configuring visualizations and learning the right clicks can still feel time-consuming. When you simply need fast answers from your business data without the setup, we built Graphed. Instead of dragging and dropping fields, you connect platforms like Google Analytics, Shopify, or Salesforce and just ask questions in plain English - like, "Compare the distribution of order value between our Facebook and Google Ads campaigns." Graphed instantly builds the right chart, helping you move from a question to an insight in seconds, not minutes.
Related Articles
What SEO Tools Work with Google Analytics?
Discover which SEO tools integrate seamlessly with Google Analytics to provide a comprehensive view of your site's performance. Optimize your SEO strategy now!
Looker Studio vs Metabase: Which BI Tool Actually Fits Your Team?
Looker Studio and Metabase both help you turn raw data into dashboards, but they take completely different approaches. This guide breaks down where each tool fits, what they are good at, and which one matches your actual workflow.
How to Create a Photo Album in Meta Business Suite
How to create a photo album in Meta Business Suite — step-by-step guide to organizing Facebook and Instagram photos into albums for your business page.