Skip to content

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

GroupBy

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

Goal

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

Sample Data

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

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. 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 → Pie Chart.

  3. Select your data

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

  4. Configure the analysis

    In the Pie 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 pie 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.