Power Query Problems

How to Fix Power Query Not Loading New CSV Columns

Natalie TaylorNatalie Taylor Oct 29, 2026 870 views

Question details

Users are unable to load newly added columns from updated CSV files using Power Query.

How to Fix Power Query Not Loading New CSV Columns
Product
Power Query
Device & OS
not provided
Scenario
Updating a data source where new columns have been added to the underlying CSV files, but the query results do not display them.
Observed behavior
Power Query ignores the newly added columns because the generated Csv.Document step has hardcoded the original number of columns based on an older sample file.
Before you start

Before modifying the M code in your query, ensure you have duplicated the original query or saved a backup copy of your workbook.

Solution 1Recommended

Remove the Fixed Columns Parameter in Advanced Editor

Manually delete the hardcoded column count in the Csv.Document function so Power Query automatically detects all available columns during refresh.

When importing CSV files, Power Query generates a sample based on the initial file. It automatically inserts a specific column count to optimize performance. Removing this fixed value forces Power Query to dynamically read the actual structure of the file.

1
Open the Advanced Editor

In the Power Query Editor, locate the 'Transform File' query or the specific query handling your CSV data. Go to the Home tab on the ribbon and click on 'Advanced Editor'.

2
Locate the Csv.Document Step

Find the line of code containing the Csv.Document function. It will look similar to: Csv.Document(Parameter2,[Delimiter=",", Encoding=1252, Columns=35, QuoteStyle=QuoteStyle.None]).

3
Delete the Columns Parameter

Carefully remove the 'Columns=X,' portion from the bracketed arguments. The updated line should look like: Csv.Document(Parameter2,[Delimiter=",", Encoding=1252, QuoteStyle=QuoteStyle.None]).

4
Save and Apply

Click 'Done' to close the Advanced Editor, then click 'Close & Load' from the Home tab to apply the changes and refresh your data set with the new columns included.

Remove the Fixed Columns Parameter in Advanced Editor
Dynamic Column Detection: Removing the explicit column count allows Power Query to dynamically read the actual number of columns present in the CSV file every time it refreshes.
Free Microsoft Office alternative

Try WPS Office for Seamless Data Management

If you frequently work with CSV files and need a fast, reliable spreadsheet tool without dealing with complex Power Query M code, WPS Office provides an intuitive, lightweight, and highly compatible alternative.

  1. 1. Download and Install WPS Office: Visit the official WPS website, download the free installer, and complete the lightweight setup process.
  2. 2. Open Your Data: Launch WPS Spreadsheet and go to 'Data' > 'Import Data' to effortlessly load and manage your CSV files without complex coding.
Fully compatible with Microsoft Excel (.xlsx, .xls, .csv) formats.Easy-to-use data import and filtering tools for dynamic CSV files.Lightweight installation with blazing fast performance on any device.Familiar user interface makes transitioning from MS Office seamless.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Power Query hardcode the number of columns for CSV files?

When you initially import a CSV or folder of CSVs, Power Query generates a sample based on the first file it reads. It automatically inserts the Columns parameter to define the structure and optimize performance based on that initial sample.

Will removing the Columns parameter slow down my data refresh?

It may slightly increase the processing time during refresh because Power Query has to count the columns dynamically each time instead of relying on a fixed number, but this difference is usually negligible and necessary for capturing dynamic data.

How do I ensure the new CSV columns have the correct data types?

After removing the fixed column count, you may need to check the 'Changed Type' step in your query. If the newly added columns aren't automatically typed, you can select them and manually assign the correct data type (like Text, Number, or Date) in the Home tab.