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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
TomRobbins
Frequent Visitor

Problem publishing after changing data source from local folder to SharePoint folder

I'll try to keep this simple.  

 

Built tons of things in PBI Desktop all using local Folder combinations of files as data source.  We assumed since these were OneDrive synced folders that we could easily publish to the Pro service when ready.  We can not because the data source in the .pbix is a local path regardless that it's synced via OneDrive (but it's called Onedrive)......  Big mistake

 

Anytime we publish it says it needs a gateway for the refresh.  Got it.  That makes sense.

 

So, I went into Advanced Editor and changed the M code to change the source to a SharePoint Folder.  Got all the queries working correctly and reports all work.  I even removed the local folders to make sure it's using the synced SP folders.

 

But after publishing the new file, the Pro service still thinks all the data sources are local paths and need a gateway.  

 

So, somewhere in the .pbix it's telling the Pro service the data sources were local which is what I originally set them up as via the GUI.  Even though I changed the M code to point to SP folders and everything works great.

 

So, does anyone have any clue here?  The only option is to completely create new queries using the SharePoint folder data source option which breaks everything from relationships to visuals.

2 REPLIES 2
AnkitKukreja
Super User
Super User

Hi @TomRobbins 

 

I would try clearing caches in Desktop and also delete the existing dataset from service and try republishing it as a new dataset. In case if this still shows you the same error, then my guess is you still might be missing a folder connection or table into this model.

 

 

For Power BI trainings or support dm or reach out to me on LinkedIn.
If my response has successfully addressed your question or concern, I kindly request that you mark this post as resolved. Additionally, if you found my assistance helpful, a thumbs-up would be greatly appreciated.

Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904

Yea I've tried all the obvious suspects.  If you created a local folder connection in the wizard and it shows in your data sources, that does not get changed if you manipulate the code in the advanced editor.  Even though I've changed the source to Sharepoint folders in the editor, the "data source settings" never reflect that.  And the data source settings is what the pro service is looking at when you publish it.

 

It's a simple thing to recreate to see what I mean.  Create a data source to a local folder.  Change the advanced editor to point to a SharePoint folder.  Notice the data source settings do not change.

 

So, how do you change the data source settings to match the changes made in the M code??

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors