Example of Stack Rows

A quality engineer records pipe diameters in separate columns for each week, along with the machine and operator that produced them. The engineer wants to combine all measurements into a single column across rows, and record the week, machine number, and operator for each row.
  1. Open the sample data, PipeDiameter.MTW.
  2. Choose Data > Stack > Rows.
  3. In Rows to be stacked are in the following columns, enter Week 1 Week 2 Week 3.
  4. In Store stacked data in, type Diameter.
  5. Select Store row subscripts in, then type Row.
  6. Select Store column subscripts in, then type Week.
  7. Select Expand the following columns while stacking rows, then enter Machine Operator.
  8. In Store the expanded columns in, type 'Machine ID' 'Operator ID'.
  9. Click OK.

Results

Week 1, Week 2, and Week 3 contain the unstacked data. The stacked data are in Diameter. The row subscripts are in Row. The column subscripts are in Week. Machine and Operator are expanded into Machine ID and Operator ID.

C1 C2 C3 C4 C5-T C6 C7 C8-T C9 C10-T
Week 1 Week 2 Week 3 Machine Operator Diameter Row Week Machine ID Operator ID
5.19 5.57 8.73 1 A 5.19 1 Week 1 1 A
5.53 5.11 5.01 2 B 5.57 1 Week 2 1 A
4.78 5.76 7.59 1 A 8.73 1 Week 3 1 A
5.44 5.65 4.73 2 B 5.53 2 Week 1 2 B
4.47 4.99 4.93 1 A 5.11 2 Week 2 2 B
4.78 5.25 5.19 2 B 5.01 2 Week 3 2 B
4.25 7.00 6.77 1 A 4.78 1 Week 1 1 A
5.70 5.20 5.66 2 B 5.76 2 Week 2 1 A
4.40 5.30 6.48 1 A 7.59 1 Week 3 1 A
5.64 4.91 5.20 2 B 5.44 2 Week 1 2 B
          5.65 1 Week 2 2 B
          4.73 2 Week 3 2 B
          4.47 1 Week 1 1 A
          4.99 2 Week 2 1 A
          ... ... ... ... ...