How to Keep Related Data on One Row in an Excel PivotTable
Question details
The user wants to prevent PivotTable records from splitting into separate rows for related data.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Organizing source data into a PivotTable where specific related records or groups need to stay consolidated on a single row.
- Observed behavior
- PivotTable records appear on separate rows due to missing unique grouping identifiers or incorrect field placement in the Rows and Columns areas.
Ensure your source data has clear column headers, no blank rows, and consistent formatting before creating or modifying your PivotTable.
Use a Helper Column and Adjust Field Placement
Create a unique identifier for your groups and adjust how fields are placed in the Rows and Values areas to consolidate data.
When a PivotTable splits related data into multiple rows, it usually means the source data lacks a single unique key, or descriptive code fields are mistakenly placed in the Rows area instead of the Values area. Consolidating the data requires a unique identifier and proper aggregation.
In your source data, add a new column that concatenates identifying fields (e.g., Co Code, Batch ID, File Number) using the '&' operator or the CONCATENATE function to create a unique key for each record or group.
Select your updated data range, go to the 'Insert' tab on the ribbon, click 'PivotTable', and choose where you want to place it.
In the PivotTable Fields pane on the right, drag your newly created helper column (the unique key) into the 'Rows' area.
Drag your numeric fields (such as Regular Hours, Temp Rate, or Amount) into the 'Values' area. Click the dropdown on each field to ensure they are summarized by 'Sum' or 'Max' as appropriate.
Do not place descriptive code fields in the Rows or Columns areas. Instead, drag them into the 'Values' area and change the Value Field Settings to 'Max' or 'First'. This forces the code to appear only once per row without splitting the grouping.

Create and Manage PivotTables Effortlessly in WPS Office
WPS Spreadsheet provides robust PivotTable features that allow you to group, summarize, and consolidate data easily. It offers full compatibility with Microsoft Excel formats, ensuring your data analysis workflows remain seamless and professional.
- 1. Open your dataset: Launch WPS Spreadsheet and open your existing data file.
- 2. Insert a PivotTable: Navigate to the 'Insert' tab and click the 'PivotTable' button.
- 3. Configure fields: Use the intuitive PivotTable pane to drag your unique identifier into 'Rows' and your numeric or code data into 'Values'.

Frequently Asked Questions
Why does my PivotTable put the same item on multiple rows?
This happens when additional fields are added to the Rows area that have varying details for the same primary item, or if there are slight differences (like trailing spaces or varying capitalization) in the source data causing them to be recognized as distinct items.
How do I show text instead of numbers in a PivotTable values area?
Native PivotTables generally aggregate data as numbers (Count, Sum, etc.). If you drag a text field to the Values area, it defaults to 'Count'. To display the actual text, you must either use Power Pivot and DAX formulas like CONCATENATEX, or restructure your data so the text field sits in the Rows area under a Tabular layout.
How can I merge cells for identical labels in my PivotTable?
Right-click anywhere inside the PivotTable and select 'PivotTable Options'. Under the 'Layout & Format' tab, check the box for 'Merge and center cells with labels', then click OK.
Can I force the PivotTable to repeat item labels for every row?
Yes. Go to the 'Design' tab under PivotTable Tools, click 'Report Layout', and select 'Repeat All Item Labels'. This ensures there are no blank cells under your primary group headers.




