Skip to content

Home / Statistical Tools / Analysis Tools / Barchart / Examples / GroupBy

GroupBy

Use GroupBy to create separate bar charts for each segment in your data, making it easy to compare category distributions across production lines, shifts, or time periods.

Goal

Create separate bar charts for each production shift, comparing which defect types are most common on each shift.

Sample Data

Download BarChart_GroupBy.xlsx

Excel Protected View

When you open downloaded files, Excel displays a Protected View warning. You must click Enable Editing before you can use Quantum XL with the file.

Excel Protected View warning

Alternatively, you can copy the sample data from the table below and paste it directly into a new Excel workbook.

Defect Type Shift
Scratch Day
Dent Day
Scratch Night
Crack Day
Scratch Day
Dent Night
Crack Night
Chip Day
Scratch Night
Dent Day

Each row represents one defect observation tagged with the shift when it occurred.

Steps

  1. Launch the analysis

    From the Excel ribbon, select QXL Stat Tools → Analysis Tools → Bar Chart.

  2. Select your data

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

  3. Configure the analysis

    In the Bar Chart dialog:

    • Select the GroupBy radio button (instead of Excel)
    • Data Columns: Uncheck "Shift"
    • 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 bar charts, one for each shift:

Day Shift — Scratch (2), Dent (2), Crack (1), Chip (1) — defects are spread relatively evenly.

Night Shift — Scratch (2), Dent (1), Crack (1) — fewer total defects but Scratch remains the most common.

Comparing the two charts reveals whether certain defect types are more prevalent on a particular shift.