Power BI, how to see new columns in a CSV file

This image has an empty alt attribute; its file name is image-3-300x140.png

When working with Power BI, what happens when you have a new column added to you CSV file?

When you refresh your data there is a very strong chance you won’t see the new column in you dataset. So how do you get Power Query to see the new column? Read on for the answer.

Picture 1

In this example we have 5 columns in Power Query as Picture 1 shows. However Picture 2 shows there are 6 columns in the actual data. Note new Column called Tax.

Picture 2

To fix this go to the Source step in Applied Steps

Picture 3

When you look at the formula bar, you’ll see that the number of columns that were in the data when you first imported have been hard coded into the Applied Steps…

Picture 4

So to solve this just delete the statement Columns=5, including the comma, from the formula bar. Once done you will see the extra column returned in the query.

Picture 5

So there you have it. To ensure that all columns are returned in Power Query when working with a CSV or TXT file, remove the hard coded column count from the first step. This will ensure that all new columns will automatically be added to the query.

If you’d prefer to watch a video on how to do do then here you go:

Back to top