Popular Searches
Popular Course Categories
Popular Courses

Creating Box-and-Whisker Plots

Creating Box-and-Whisker Plots

Advanced Chart Types

Creating Box-and-Whisker Plots in Tableau – Detailed Notes

Course: JustAcademy Tableau Training

Course Demo: Register for a Tableau Course Demo


1. Introduction to Box-and-Whisker Plots

A Box-and-Whisker Plot, also known as a Box Plot, is a statistical visualization used to understand the distribution, spread, median, quartiles, and potential outliers in numerical data. It provides a compact summary of how values are distributed within a dataset.

In Tableau, box-and-whisker plots are especially useful when comparing numerical values across categories, such as sales across regions, employee salaries across departments, product delivery times across shipping methods, or customer spending across customer segments.

Unlike a simple bar chart, which typically compares totals or averages, a box plot helps reveal the variation within each group. It can show whether values are closely grouped, widely spread, skewed, or contain unusually high or low observations.

Example: A business wants to compare delivery times across four shipping methods. A box plot can show the median delivery time, the middle 50% of delivery times, the overall spread represented by the whiskers, and potential outliers for each shipping method.

2. Learning Objectives

  • Understand the purpose and structure of a box-and-whisker plot.
  • Learn about minimum, maximum, median, quartiles, and interquartile range.
  • Understand whiskers and potential outliers.
  • Create box plots in Tableau using Show Me.
  • Create box plots using Tableau's Analytics pane.
  • Understand the importance of data granularity and aggregation.
  • Compare distributions across multiple categories.
  • Format, customize, and interpret box plots.
  • Apply box plots to real-world business analysis.

3. Main Components of a Box-and-Whisker Plot

A box plot contains several important statistical elements. Understanding these components helps you interpret the chart correctly.

3.1 Minimum and Maximum Values

The minimum and maximum are the smallest and largest observed values in the dataset. However, in a conventional box plot using the 1.5 × IQR rule, the whiskers do not necessarily extend to the absolute minimum and maximum. They extend to the most extreme observations within the whisker limits, while values beyond those limits are displayed as potential outliers.

3.2 First Quartile (Q1)

The first quartile, also called the lower quartile, is the 25th percentile. Approximately 25% of the observations are at or below this value, depending on the percentile calculation method.

3.3 Median (Q2)

The median is the middle value of an ordered dataset. It divides the observations into two halves. In a box plot, the median is represented by a line inside the box.

3.4 Third Quartile (Q3)

The third quartile, also called the upper quartile, is the 75th percentile. Approximately 75% of the observations are at or below this value.

3.5 Interquartile Range (IQR)

The interquartile range measures the spread of the middle 50% of the data. It is calculated by subtracting the first quartile from the third quartile.

Formula: IQR = Q3 − Q1

A larger IQR indicates that the middle half of the observations is more spread out. A smaller IQR indicates that the middle half is more concentrated.

3.6 The Box

The box extends from Q1 to Q3 and represents the middle 50% of the observations. The median line inside the box shows the central value of the distribution.

3.7 Whiskers

Whiskers extend outward from the box. In a common box plot configuration, they reach the most extreme data points within the lower and upper limits calculated using 1.5 times the IQR. Tableau also allows whiskers to extend to the maximum extent of the data.

3.8 Outliers

Potential outliers are observations that lie beyond the whisker limits. They are often displayed as individual marks outside the whiskers. An outlier is not automatically a data error; it may be a valid observation that deserves further investigation.

4. Understanding the 1.5 × IQR Rule

A commonly used box plot method calculates lower and upper limits to identify potential outliers.

Lower fence: Q1 − (1.5 × IQR)

Upper fence: Q3 + (1.5 × IQR)

Values below the lower fence or above the upper fence are considered potential outliers under this rule. The fences are not necessarily the actual endpoints of the whiskers. In the standard 1.5 × IQR configuration, the whiskers extend to the most extreme observed values that remain within the fences.

Example Calculation

Suppose a dataset has the following values:

  • Q1 = 20
  • Median = 35
  • Q3 = 50

Step 1: Calculate the IQR.

IQR = Q3 − Q1 = 50 − 20 = 30

Step 2: Calculate the lower fence.

Lower fence = 20 − (1.5 × 30) = 20 − 45 = −25

Step 3: Calculate the upper fence.

Upper fence = 50 + (1.5 × 30) = 50 + 45 = 95

Interpretation: Under this rule, values below −25 or above 95 are potential outliers. The actual whiskers extend to the most extreme observed values within these limits. For a dataset that contains only non-negative values, the lower whisker might reach the smallest observed value if that value is within the lower fence.

5. Box-and-Whisker Plot Structure

Component Statistical Meaning What It Helps You Understand
Q1 25th percentile Lower boundary of the middle 50%.
Median 50th percentile Central position of the distribution.
Q3 75th percentile Upper boundary of the middle 50%.
Box Range from Q1 to Q3 Spread of the middle half of the data.
IQR Q3 − Q1 Variation in the middle 50%.
Whiskers Configured extent of the distribution Spread beyond the box.
Outlier marks Values beyond whisker limits Observations that may warrant investigation.

6. Why Use Box-and-Whisker Plots in Tableau?

  • Compare distributions: Compare the spread of sales, profit, salary, or delivery times across groups.
  • Identify potential outliers: Find observations that differ considerably from the rest.
  • Understand variability: Determine which groups have more or less variation.
  • Compare medians: Quickly see which category has a higher or lower central value.
  • Examine skewness: Differences in whisker lengths and median position may indicate an asymmetric distribution.
  • Summarize large datasets: Represent important distribution characteristics without showing every value individually.
  • Support decision-making: Help teams identify unusual transactions, inconsistent performance, or groups requiring further investigation.

7. Requirements for Creating Box Plots

Before creating a box plot, make sure your data includes the following:

  • A numerical measure, such as Sales, Profit, Discount, Quantity, Salary, or Delivery Time.
  • A dimension for grouping the data, such as Region, Segment, Category, Department, or Shipping Method.
  • Sufficient observations within each group to make the distribution meaningful.
  • A suitable level of detail so the chart represents the individual observations or relevant underlying values rather than only a single aggregate.

Important: A box plot based on only one aggregated value per category may appear as a flattened line. To display a meaningful distribution, Tableau needs enough underlying observations or marks within each group.

8. Method 1: Create a Box Plot Using Show Me

Show Me provides a convenient way to create a box-and-whisker plot in Tableau. It is suitable for beginners who want to create a distribution comparison quickly.

Step-by-Step Instructions

  1. Open Tableau Desktop and connect to a dataset, such as Sample - Superstore.
  2. Open a new worksheet.
  3. Identify a numerical measure, such as Discount, Sales, or Profit.
  4. Drag a category dimension, such as Segment or Region, to the Columns shelf.
  5. Drag the numerical measure to the Rows shelf.
  6. If necessary, adjust the aggregation. For example, use Average when the analysis is intended to compare average discount values, while ensuring there are enough underlying observations to show a distribution.
  7. Select the relevant fields in the Data pane or view, as required by Show Me.
  8. Click the Show Me panel in the toolbar.
  9. Select Box-and-Whisker Plot.
  10. Inspect the box, median, whiskers, and individual marks.
  11. Rename the worksheet, for example, Profit Distribution by Region.

Expected Result

Tableau displays box plots for the selected groups. Each box summarizes the middle 50% of the data, the line inside the box indicates the median, and the whiskers show the configured extent of the distribution. Potential outliers may appear as individual marks beyond the whiskers.

Note: The exact field placement and appearance may vary depending on the Tableau version, the fields selected, and the level of detail in the view.

9. Method 2: Create a Box Plot Using the Analytics Pane

The Analytics pane allows you to add a box plot to an existing view. This is useful when you want to preserve the structure of a view and add statistical distribution information to it.

Step-by-Step Instructions

  1. Create a view containing a continuous numerical axis.
  2. Use a dimension to divide the view into the categories you want to compare.
  3. Click the Analytics tab beside the Data pane.
  4. Locate Box Plot in the available analytics options.
  5. Drag Box Plot into the view and drop it on the appropriate target, such as a cell.
  6. If a configuration dialog appears, review the whisker and formatting options.
  7. Choose the whisker configuration that suits your analysis.
  8. Review the resulting box plot and confirm that the view has enough underlying data points.

In Tableau Desktop, you can also right-click a continuous axis and select Add Reference Line. In the dialog box, select Box Plot to add a box plot to the view. The precise options available can vary by Tableau product and authoring environment.

10. Method 3: Create a Box Plot Using the Analytics Menu or Axis Options

This method is useful when you already have a chart and want to add a box plot without rebuilding the entire view.

  1. Build a chart containing a continuous measure and the desired dimensions.
  2. Right-click the numerical axis.
  3. Select Add Reference Line or the equivalent box plot option available in your Tableau version.
  4. Choose Box Plot in the dialog box.
  5. Configure the whisker method, appearance, and underlying mark visibility.
  6. Click OK or apply the settings.
  7. Check that the box plot summarizes the intended observations.

Difference between Show Me and Analytics: Show Me creates the box plot as the main visualization. The Analytics pane or axis-based method adds a box plot to an existing view.

11. Understanding Aggregation and Data Granularity

Data aggregation is an important concept when creating box plots in Tableau. Tableau commonly aggregates measures by default. If each category is represented by only one aggregated value, there may not be enough marks to display a meaningful distribution.

Example

Suppose you want to compare sales across three regions: East, West, and Central.

  • If the view contains only one SUM(Sales) value for each region, each region has only one summarized mark.
  • A box plot based on these three aggregate values does not show the distribution of individual sales records within each region.
  • If the goal is to examine the distribution of sales records, the view needs the appropriate record-level detail or another suitable level of granularity.

How to Review Aggregation

  1. Inspect the fields on Rows, Columns, and the Marks card.
  2. Check whether the numerical measure is aggregated, such as SUM or AVG.
  3. Determine what each mark represents in the current view.
  4. If appropriate, use a more granular dimension or select Analysis > Aggregate Measures to disaggregate the data.
  5. Review the box plot to confirm that it reflects the intended underlying observations.

Warning: Disaggregating data changes the level of detail in the view and may affect performance or chart interpretation. Use it only when it matches the analytical objective.

12. Configuring Whiskers in Tableau

Tableau supports different whisker configurations for box plots. The selected method affects how the spread of the data is represented and how potential outliers appear.

Whisker Configuration Description When It Is Useful
1.5 × IQR Whiskers extend to the most extreme observations within the lower and upper limits calculated from 1.5 times the IQR. When you want to identify potential outliers using a common statistical convention.
Maximum extent of data Whiskers extend to the minimum and maximum extent of the data. When you want the whiskers to show the full observed range.

How to Change the Whisker Method

  1. Right-click the box plot or the relevant axis.
  2. Select the Edit option for the box plot or reference object.
  3. Locate the whisker configuration in the dialog box.
  4. Choose the 1.5 × IQR option or the maximum-extent option, depending on your analytical requirement.
  5. Apply the change and review the whiskers and any outlier marks.

When using the 1.5 × IQR method, points outside the whiskers are potential outliers under that rule. When using the maximum extent of the data, the whiskers reach the observed extremes, so those same points will not appear outside the whiskers under this configuration.

13. Formatting and Customizing Box Plots

13.1 Change the Chart Title

Use a descriptive title that identifies the measure and grouping, such as Sales Distribution by Region, Employee Salary Distribution by Department, or Delivery Time by Shipping Method.

13.2 Edit Axis Titles

Use meaningful labels. For example, label the numerical axis Sales Amount and the category axis Region.

13.3 Adjust Colors

Use consistent colors when comparing similar groups. You may use Color on the Marks card to distinguish categories, but avoid excessive color variations that distract from the statistical summary.

13.4 Change Box Fill and Border

Use the box plot's formatting or edit options to adjust fill, border, and whisker appearance when those settings are available in your Tableau environment.

13.5 Display or Hide Underlying Marks

Depending on the box plot configuration, you can hide underlying marks while retaining outliers, or display more of the individual observations. Showing marks can help explain the distribution but may make a chart crowded when the dataset is large.

13.6 Improve Tooltips

Include relevant details such as region, product category, measure value, and other useful dimensions. Avoid adding unrelated fields that make the tooltip difficult to read.

13.7 Sort Categories

Where appropriate, sort categories by median, average, or another relevant statistic to make comparisons easier. Ensure the sorting method matches the purpose of the analysis.

14. Practical Example: Comparing Sales Across Regions

Business scenario: A retail company wants to understand how sales values vary across East, West, Central, and South regions. The goal is to compare typical values, variability, and potential unusually large or small sales records.

Steps to Complete the Analysis

  1. Connect Tableau to the Sample - Superstore dataset or another sales dataset.
  2. Drag Region to Columns.
  3. Drag Sales to Rows.
  4. Configure the view so it contains enough observations to represent the sales distribution within each region.
  5. Open Show Me and select Box-and-Whisker Plot, or add a box plot from the Analytics pane.
  6. Review the median and the size of each box.
  7. Compare whisker lengths and investigate any outlier marks.
  8. Give the chart a descriptive title, such as Sales Distribution by Region.

Questions to Answer

  • Which region has the highest median sales value?
  • Which region has the widest interquartile range?
  • Which region shows the greatest overall spread?
  • Are there potential outliers in any region?
  • Are the distributions similarly shaped or noticeably different?

Important: These are analysis questions, not pre-established findings. Use the actual Tableau view to determine the answers.

15. Practical Example: Employee Salary Distribution

Business scenario: An HR team wants to compare salary distributions across departments to understand typical pay levels, variation, and unusual salary values.

Suggested Fields

Field Role
Department Dimension used to group employees.
Salary Numerical measure used to build the box plot.
Job Level Optional dimension for additional analysis.
Employee ID Optional detail field to help preserve individual-level observations.

Steps

  1. Connect to the employee dataset.
  2. Drag Department to Columns.
  3. Drag Salary to Rows.
  4. Ensure the data is represented at an appropriate level of detail.
  5. Create the box plot using Show Me or the Analytics pane.
  6. Compare the median salary across departments.
  7. Inspect the IQR to understand variation within departments.
  8. Investigate potential outliers using relevant information such as job level, role, or employment type.

Business benefit: The chart can help HR analysts identify differences in salary distributions. However, a box plot alone cannot determine whether a salary difference is fair or justified; further context and analysis are needed.

16. Practical Example: Comparing Delivery Times

An e-commerce company wants to compare delivery performance across shipping methods.

Suggested Analysis

  • Use Shipping Method as the grouping dimension.
  • Use Delivery Time as the numerical measure.
  • Compare median delivery times to understand typical performance.
  • Compare the IQR to see which shipping method has more consistent delivery times.
  • Review long whiskers and potential outliers to identify unusually delayed deliveries.

A shipping method with a low median and a narrow IQR may offer both faster and more consistent delivery, although the conclusion should also consider cost, service coverage, and sample size.

17. Interpreting Box Plots Correctly

17.1 Comparing Medians

The median line inside each box indicates the central value. Comparing medians helps identify which group generally has higher or lower values. A higher median does not necessarily mean that every observation in that group is higher than observations in another group.

17.2 Comparing Interquartile Ranges

A taller box in a vertical plot or a longer box in a horizontal plot indicates a larger IQR and therefore more spread in the middle 50% of the data.

17.3 Comparing Whiskers

Longer whiskers indicate a greater spread beyond the box under the selected whisker configuration. Differences in whisker length can suggest that the groups have different ranges or asymmetry.

17.4 Identifying Potential Outliers

Marks beyond the whiskers may indicate unusual observations. Investigate their context before classifying them as errors or removing them.

17.5 Detecting Possible Skewness

If the median is not centered in the box, or if one whisker is considerably longer than the other, the distribution may be asymmetric. These patterns are clues rather than definitive proof of skewness.

17.6 Understanding Overlapping Boxes

Overlapping boxes do not, by themselves, prove that two distributions are the same or statistically indistinguishable. A box plot is a descriptive visualization. Formal statistical conclusions may require additional analysis.

18. Box Plot vs. Histogram vs. Bar Chart

Feature Box Plot Histogram Bar Chart
Primary purpose Summarizes distribution and spread. Shows frequency across numerical bins. Compares categories.
Median Shown directly. Not shown directly. Not shown directly unless separately encoded.
Quartiles Shown directly. Not shown directly. Not shown directly.
Distribution shape Summarized through quartiles, whiskers, and outliers. Shown through the shape of the bars. Usually not designed for continuous distribution analysis.
Potential outliers Often shown as marks outside the whiskers. May appear in low-frequency extreme bins. Usually not shown as a distribution feature.
Best use Comparing distributions across groups. Exploring the frequency pattern of numerical values. Comparing totals or values by category.

19. Common Mistakes and Troubleshooting

Problem Possible Cause Solution
The box plot looks like a flat line. The view may contain only one aggregated mark per group or very little variation. Check data granularity and ensure there are enough underlying observations.
The box plot option is unavailable. The selected fields or view may not meet the requirements for Show Me. Start with a numerical measure and a relevant grouping dimension, then review the Show Me options.
No outliers are visible. The data may have no observations beyond the selected whisker limits, or the whiskers may extend to the full data range. Review the whisker configuration and inspect the underlying data.
The chart contains too many marks. The view may show individual observations for a very large dataset. Consider hiding underlying marks, using suitable filters, or simplifying the view.
Groups are difficult to compare. There may be too many categories or inconsistent axis scales. Reduce the number of groups, use a consistent scale, and sort categories meaningfully.
Quartile interpretation seems unexpected. The data distribution, sample size, or percentile calculation method may affect the result. Inspect the underlying values and Tableau's statistical summary.
The measure shows totals instead of individual values. The measure is aggregated in the current view. Review the aggregation and level of detail before interpreting the box plot.
Outliers are automatically treated as errors. Potential outliers are being interpreted without business context. Investigate the records before deciding whether to correct or exclude them.

20. Best Practices for Creating Box-and-Whisker Plots

  • Use box plots when distribution comparison is the primary analytical goal.
  • Choose a meaningful numerical measure and a suitable grouping dimension.
  • Ensure each group contains enough observations for a useful distribution summary.
  • Understand the aggregation and granularity of the view.
  • Use consistent axes when comparing groups.
  • Label the axes and chart title clearly.
  • Use a simple, consistent color scheme.
  • Choose the whisker method based on the analysis requirement.
  • Investigate potential outliers instead of automatically deleting them.
  • Consider a histogram when the detailed frequency shape of a distribution is important.
  • Avoid creating too many box plots in one view if the chart becomes crowded.
  • Use tooltips to provide relevant context about the measure and category.

21. Practice Exercises

Exercise 1: Profit by Region

Create a box plot of Profit by Region. Compare medians, IQRs, whiskers, and potential outliers.

Exercise 2: Discount by Segment

Create a box plot showing Discount by Segment. Ensure the view contains enough underlying observations and explain the differences between the groups.

Exercise 3: Sales by Product Category

Build a box plot of Sales by Category. Identify which categories have the largest IQR and investigate potential outliers.

Exercise 4: Employee Salaries

Using an employee dataset, compare Salary by Department. Discuss differences in median and variation.

Exercise 5: Delivery Time by Shipping Method

Create a box plot to compare delivery-time distributions. Identify the method with the lowest median and investigate unusual delivery times.

22. Mini Project: Business Performance Distribution Dashboard

Project Objective: Create an interactive Tableau dashboard that compares the distribution of a numerical business measure across multiple groups.

Project Requirements

  • Connect to a suitable dataset, such as Sample - Superstore.
  • Create a box plot of Profit by Region.
  • Create a second box plot of Sales by Category.
  • Use appropriate detail so each box plot represents a meaningful distribution.
  • Apply consistent formatting and readable titles.
  • Add relevant filters, such as Region or Segment, where useful.
  • Place the charts on a dashboard.
  • Write a short explanation of the median, spread, and potential outliers.

Expected Learning Outcomes

  • Build box-and-whisker plots in Tableau.
  • Interpret quartiles, medians, IQRs, and whiskers.
  • Understand the effects of aggregation and data granularity.
  • Compare distributions across business categories.
  • Present distribution insights in an interactive dashboard.

23. Interview Questions and Answers

Q1. What is a box-and-whisker plot?

Answer: A box-and-whisker plot is a statistical chart that summarizes the distribution of numerical data using quartiles, a median, whiskers, and sometimes individual marks for potential outliers.

Q2. What does the box represent?

Answer: The box extends from the first quartile (Q1) to the third quartile (Q3), representing the middle 50% of the observations.

Q3. What is the median?

Answer: The median is the middle value of an ordered dataset and is represented by a line inside the box.

Q4. What is the interquartile range?

Answer: The IQR is the difference between the third quartile and the first quartile: IQR = Q3 − Q1.

Q5. How are potential outliers identified?

Answer: Under the common 1.5 × IQR rule, values below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR are potential outliers.

Q6. How do you create a box plot in Tableau?

Answer: Place a suitable numerical measure and grouping dimension in the view, then use Show Me to select Box-and-Whisker Plot. Alternatively, add a box plot from the Analytics pane or the appropriate axis options.

Q7. What is the difference between a box plot and a histogram?

Answer: A box plot summarizes the distribution using quartiles, median, whiskers, and potential outliers. A histogram shows the frequency of values within numerical intervals.

Q8. Why might a box plot appear flat?

Answer: It may be based on only one aggregated mark per category or on values with very little variation. Check the granularity and aggregation of the view.

Q9. What do longer whiskers indicate?

Answer: Longer whiskers indicate greater spread beyond the box under the selected whisker configuration.

Q10. Does every outlier represent an error?

Answer: No. An outlier is an observation that falls beyond the selected statistical limits. It may be valid and should be investigated before being corrected or removed.

Q11. What is the difference between the 1.5 × IQR whisker method and the maximum-extent method?

Answer: The 1.5 × IQR method extends whiskers to the most extreme observations within the calculated limits. The maximum-extent method extends them to the minimum and maximum observed values.

Q12. When should you use a box plot?

Answer: Use a box plot when you want to compare the median, spread, and potential outliers of numerical data across categories.

24. Quick Revision Checklist

  • ☐ I understand the purpose of a box-and-whisker plot.
  • ☐ I can explain Q1, median, Q3, and IQR.
  • ☐ I understand how whiskers and potential outliers work.
  • ☐ I can create a box plot using Show Me.
  • ☐ I can add a box plot using the Analytics pane.
  • ☐ I can configure whiskers and formatting.
  • ☐ I understand the importance of data granularity and aggregation.
  • ☐ I can compare distributions across regions, segments, or categories.
  • ☐ I can identify potential outliers without assuming they are errors.
  • ☐ I can explain when a box plot is more useful than a histogram or bar chart.

25. Official Tableau Learning Resources

26. Conclusion

Box-and-whisker plots are powerful Tableau visualizations for comparing numerical distributions. They summarize the median, quartiles, interquartile range, whiskers, and potential outliers in a compact format. By choosing the right level of detail, configuring the whiskers correctly, and interpreting the chart in context, analysts can compare business performance and investigate unusual values more effectively.

To continue learning Tableau, visit JustAcademy Tableau Training or Register for a Tableau Course Demo.

whatsapp