Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
rmsl
Frequent Visitor

Weird behavior when importing data from cvs

Hi all,

 

I am importing some data from a csv file but some columns are showing and being recognised as empty for some reason. Then any manipulation would result in an error afterwards;

 

here are the screenshots;

 

rmsl_0-1664870328453.png

 

then when trying for example to put first line as title;

 

rmsl_1-1664870461079.png

 

Any Ideas?

 

Thanks,

Rmsl

2 REPLIES 2
HotChilli
Super User
Super User

It looks like there are spaces or tabs or hidden characters in the csv file.

If this is a one-off, you can just delete the extra columns, job done.

If this happens consistently , there are other techniques e.g. you can pass the number of columns to csv.Document as a parameter and it will ignore any 'extra' ones

OR add a 'remove other columns' step once you have selected all the desired columns.

@HotChilli thanks - however I've tried to locate spaces / tabs or hidden characters and nothing. Those blank columns aren't extra columns - they are somehow being considered as blank whereas they aren't.

 

When trying to filter the column 13 which as you can see shows "WM" many times - the only option is (Blanks)

rmsl_0-1664872736086.png

 

Also, when openning the reports via folder (i.e. Csv.Document(File.Contents( etc.) it works fine.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.