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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
hsimahf
New Member

Power query not loading all columns of a CSV

Hi,

I am using Power Query to manipulate data from a CSV. This CSV has many columns (5913) and only a couple of rows (4). As you might imagine, one of the first things I want to do is transpose the data. When I load the CSV into Power Query and then transpose it, I only get 2,672 rows. This is without any filtering or anything which would explain why the number of rows has gone down.

I have tried to find some evidence of a column limit on Power Query which might explain why some of the data is not making it through, but I have only seen references to limits of 10,000+ columns which would be sufficient for the data I have.

 

Of course I can transpose it using Excel first and then import as an Excel file, which is my current workaround, but this adds an extra manual step I would prefer to avoid since I am planning to repeat a process loading possibly hundreds of files this way.

 

Does anybody have any ideas as to what might cause this / how I can change it? Thank you in advance

 

If you want to try and recreate:

1 ACCEPTED SOLUTION
hsimahf
New Member

Strangely, I may have fixed this. Firstly, a screenshot showing that my last column was the 2671st column.

hsimahf_0-1737558245391.png

I then clicked on the source, changed it to read it as a Text file rather than a CSV, then changed it back to CSV. Voila, all 5913 now appear. No idea why but posting here in case of use to others.

 

hsimahf_1-1737558344297.png

 

View solution in original post

3 REPLIES 3
Chewdata
Super User
Super User

Hey!

This may be caused by how the csv.document() 'read's' your csv-file. 
However it is hard to debug without the code or a sample of the original file. 


I see that you file also has  comma's in the values. You can try to alter the options in de Imported CSV step:
= Csv.Document(URLTOYOURCSV,[Delimiter=",", columns=10, Encoding=65001, QuoteStyle=QuoteStyle.None])

 

  • remove the columns=x  expression, it will then try to load all available columns.
  • Replace QuoteStyle=QuoteStyle.None for CsvStyle=CsvStyle.QuoteAfterDelimiter

 

v-ssriganesh
Community Support
Community Support

Hi @hsimahf,

May I ask if you have resolved this issue? If so, please mark it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

hsimahf
New Member

Strangely, I may have fixed this. Firstly, a screenshot showing that my last column was the 2671st column.

hsimahf_0-1737558245391.png

I then clicked on the source, changed it to read it as a Text file rather than a CSV, then changed it back to CSV. Voila, all 5913 now appear. No idea why but posting here in case of use to others.

 

hsimahf_1-1737558344297.png

 

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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