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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
PowerAutomater
Advocate II
Advocate II

CSV data source missing columns depending on how it is imported

When I use the the Text/CSV import option of "Get Data" all of the columns from my local CSV file come through and are avilable to use for visualisations. If I then upload the same CSV file to sharepoint and import this data source via the sharepoint folder import option, only 4 or so of the columns come through and I'm really puzzled as to why. They are a copy of the same file, just being imported via different options. I also use the load option each time.

Is there a setting or something I need to adjust for the online file to import the same as the local one? I need the source to be online so it is accessible to others, as it will be getting replaced every so often.

1 ACCEPTED SOLUTION
PowerAutomater
Advocate II
Advocate II

Worked it out. I needed to choose transform data instead of load, then click on Binary in the first column. This video goes through it: How to connect to a data file in a SharePoint folder in Power BI

View solution in original post

6 REPLIES 6
PowerAutomater
Advocate II
Advocate II

Worked it out. I needed to choose transform data instead of load, then click on Binary in the first column. This video goes through it: How to connect to a data file in a SharePoint folder in Power BI

danextian
Super User
Super User

Hi @PowerAutomater 

 

When combining multiple CSV files using the folder connection (whether local or sharepoint) and is done using the combine and transform feature of the GUI, Power Query uses a sample file as a basis for transformations to be done as well as the columns to pick so it is possible that the sample file doesn't have all the columns.  In the screenshot below, Table.ColumnNames parses the the column names from Sample File as a list and uses this list to pick which columns to expand.

danextian_0-1735791427568.png

I would remove that applied step and manually expand the tables

danextian_1-1735791565124.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Hi @danextian , I am actually not combining multiple files I am using a single CSV file.

I couldn't find the steps you meant unfortunately as I only have source when importing:

PowerAutomater_0-1735793252407.png


And the query just looks like this:

PowerAutomater_1-1735793285987.png

 

You are trying to directly connecting to a CSV file in sharepoint? The Columns parameter determines the number of columns the connection is going to try to parse but it is actually optional so you can remove this part: Columns=15,

= Csv.Document(File.Contents("path\file.csv"),[Delimiter=",", Columns=15, Encoding=1252, QuoteStyle=QuoteStyle.Csv])

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

The formula for me looks like this:

= SharePoint.Files("https://sharepoint.folder.path/", [ApiVersion = 15])

There isn't a column parameter. And if I click on the choose columns button, there is the same limited number of columns listed, it's like it's not getting fully imported or something.

That is a SharePoint folder connection and doesn't directly connect to a file stored in sharepoint. Use the full path to the file and the web connector instead of that.

danextian_0-1735882515627.png

danextian_1-1735882542227.png

danextian_2-1735882555545.png

Use the path only up to the extension in case there is an extra text string.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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