Skip to content

Home / Statistical Tools / Analysis Tools / Boxplot / How-To / GroupBy

GroupBy

Use GroupBy to create separate box plot charts for each group in your data, making it easy to compare distributions across shifts, departments, or locations.

Goal

Compare measurement distributions between Day and Night shifts to see whether one shift produces more variable results than the other.

Sample Data

Press Copy for Excel, then paste the table into a blank worksheet.

Measurement Shift
25.3 Day
27.1 Night
24.8 Day
31.5 Night
26.0 Day
29.7 Night
25.5 Day
28.3 Night
24.2 Day
33.0 Night

Each row represents one measurement tagged with the shift when it was taken. Day shift has 5 observations and Night shift has 5 observations.

Steps

  1. Put the data in Excel

    Press Copy for Excel above the table, click cell A1 in a blank worksheet, and press Ctrl+V. The header row lands in row 1 and the 10 data rows in rows 2 through 11.

  2. Launch the analysis

    From the Excel ribbon, select QXL Stat Tools → Analysis Tools → Box Plot.

  3. Select your data

    Select cells A1:B11 (the header row plus all 10 data rows).

  4. Configure the analysis

    In the Box Plot dialog:

    • Select the GroupBy radio button (instead of Excel)
    • Data Columns: "Measurement" should be checked, "Shift" should be unchecked
    • GroupBy: Move "Shift" to the GroupBy Order list

    Click Finish to generate the charts.

How GroupBy Works

When you add a GroupBy column, Quantum XL creates a separate chart for every unique value in that column. In this example, the "Shift" column has two unique values ("Day" and "Night"), so we get two charts.

Result

Quantum XL creates two box plot charts, one for each shift:

Day Shift: Five measurements ranging from 24.2 to 26.0, with a relatively tight distribution.

Night Shift: Five measurements ranging from 27.1 to 33.0, with a wider spread and higher center.

The two charts make it easy to see that the Night shift produces higher and more variable measurements than the Day shift.

Common Vertical Axis

Enable All Charts Share Common Vertical Axis Scale in the Box Plot Options tab to make visual comparisons between charts easier. Without this option, each chart scales independently, which can make differences harder to spot.