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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Adman1020
New Member

OneDrive CSV without Headers loaded into PowerBI Service?

I am loading some CSV files from OneDrive for Business into the Power BI service (as Desktop doesn't directly talk to it, and you get the automatic refresh bonus).

 

However my files don't have headers, and as theres no Query Editor in the Service I can't change that, so my first row is becoming the headers. Its causing some issues with a few files where the first row has the same value in a couple of columns, which then fails to load due to non unique headers.

 

Is there a way to add headers when loading OneDrive files? If not, does anyone know of a way to add a header row to a CSV in Flow (Im downloading the files in a zip from an external site and extracting them to a OneDrive folder using Flow)? Or, am I going to have to put the files somewhere other than OneDrive and go the long way round using Desktop (and maybe a Gateway) to be able to use PowerQuery on the files (and thus losing the handy 1 hour auto refesh)?

 

Thanks!

1 ACCEPTED SOLUTION

Indeed, but Power Query isn't available when connecting directly to OneDrive files in the Service.

 

I've found a workaround by using the SharePoint link from a OneDrive file when opened in Excel, used that in Power BI Desktop and utilised Power Query there, then published to the Service and setup a scheduled refresh. It feels like a bit of a hack but it works.

View solution in original post

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

@Adman1020 ,


Is there a way to add headers when loading OneDrive files? If not, does anyone know of a way to add a header row to a CSV in Flow (Im downloading the files in a zip from an external site and extracting them to a OneDrive folder using Flow)? Or, am I going to have to put the files somewhere other than OneDrive and go the long way round using Desktop (and maybe a Gateway) to be able to use PowerQuery on the files (and thus losing the handy 1 hour auto refesh)?


Currently power bi doesn't have this feature. However, in power query, you can click "Transform", then click "Use First Row as Headers" so that the first row become the new headers. Then publish the report to power bi service.

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Indeed, but Power Query isn't available when connecting directly to OneDrive files in the Service.

 

I've found a workaround by using the SharePoint link from a OneDrive file when opened in Excel, used that in Power BI Desktop and utilised Power Query there, then published to the Service and setup a scheduled refresh. It feels like a bit of a hack but it works.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors