Why Excel Changes Column Order in PivotTable Details (And How to Fix It)
Question details
The user wants to know why Excel rearranges the column order when generating a details worksheet from a PivotTable value and how to prevent this behavior.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Double-clicking a PivotTable value to generate and view the underlying details worksheet from the Data Model.
- Observed behavior
- The generated details worksheet displays columns in a different order compared to the original Power Query or source fact table, often moving columns hidden from client tools to the end in alphabetical order.
Ensure you have access to the original Power Query or Power Pivot Data Model settings in your workbook, as you will need to modify the visibility of hidden columns to resolve this layout issue.
Unhide Columns in the Data Model to Restore Original Order
Making all columns visible to client tools prevents Excel from moving them to the end of the details worksheet, thereby preserving your original source order.
When Excel generates a details worksheet from a Data Model PivotTable, it processes columns based on their visibility properties. Columns marked as 'Hidden from Client Tools' are automatically pushed to the right side of the generated table and sorted alphabetically. Unhiding them forces Excel to respect the original source fact table layout.
Navigate to the Power Pivot tab on your Excel ribbon and click on the 'Manage' button to open the Data Model window.
In the Data View or Diagram View, identify the columns that appear grayed out, indicating they are currently hidden from client tools.
Right-click the header of each hidden column and select 'Unhide from Client Tools' from the context menu.
Close the Power Pivot window, return to your PivotTable, and double-click the desired value again. The new details worksheet will now display the columns in their original source order.

Manually Rearrange Columns in the Details Worksheet
If you prefer to keep columns hidden in the Data Model to maintain a clean PivotTable Field List, you can manually reorder the generated table after it is created.
Try WPS Office for a Streamlined Data Analysis Experience
If Excel's complex Data Model behaviors are causing unexpected formatting issues in your workflow, WPS Office offers a free, lightweight, and highly compatible alternative. WPS Spreadsheet provides intuitive PivotTable features without unexpected layout changes, ensuring your data analysis remains straightforward and efficient.
- 1. Download and Install: Download WPS Office for free from the official website and install it on your computer.
- 2. Open Your Excel File: Launch WPS Spreadsheet and open your existing .xlsx workbook directly without formatting loss.
- 3. Create or Manage PivotTables: Navigate to the 'Insert' tab to create a new PivotTable, or click on an existing one to access the intuitive Field List.
- 4. Drill Down for Details: Double-click any summarized value in your PivotTable to instantly view the underlying data details exactly as expected.

Frequently Asked Questions
Can I change the drill-down column order without unhiding columns in the Field List?
Currently, Excel's default behavior for Data Model PivotTables automatically moves hidden columns to the end and sorts them alphabetically. You must either unhide them in the Power Pivot manager or manually drag to rearrange the columns after the details worksheet is generated.
Why does standard PivotTable drill-down keep the original order, but Data Model drill-down changes it?
Standard PivotTables are based directly on a flat worksheet range and preserve the exact column order of that range. Data Model PivotTables, however, process metadata through an OLAP engine, applying specific rules that push columns marked as 'Hidden from Client Tools' to the end of the query results.
How do I access the Data Model to unhide columns?
Navigate to the 'Power Pivot' tab on the main Excel ribbon and click 'Manage'. This opens the Data Model window. From there, you can view the Diagram or Data view, right-click the grayed-out columns, and toggle the 'Hide from Client Tools' setting off.




