Forum

Re-enabling data lo...
 
Notifications
Clear all

Re-enabling data loading after changing the source folder

6 Posts
2 Users
0 Reactions
72 Views
(@aremotti)
Posts: 3
Active Member
Topic starter
 

I've made an excel file with a Power Query importing CSV files from a local folder; everything works perfectly.

Now, I need to change the folder location. I pressed "Data Origin Setup" and successfully changed the folder name.

When I update my query, I get the error:
"Couldn't update your query table: query has been changed in Power Query after the creation of this connection. Disable and enable data loading for this query."

How can I actually re-enable data loading?

Thanks in advance
Andrea Remotti

 
Posted : 06/09/2019 4:34 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Andrea,

Welcome to our forum.

I'm not sure what you mean by you pressed 'Data Origin Setup'...is that in Excel or the Query Editor. I don't have any buttons with that name.

I usually just edit the M code in the Query Editor Window's Home tab > Advanced Editor. The first line of code contains the folder path.

Mynda

 
Posted : 06/09/2019 7:24 am
(@aremotti)
Posts: 3
Active Member
Topic starter
 

Hi Mynda,

I mean the "Data Origin Setup" button within the "Power Query" tab.

See the red circle in the attached Screenshot; it's in Italian but I expect you to recognize it.

I have Excel 2013.

I've verified that changing the folder name from that button, also the M code in the Query Editor reports the new name, but I'm getting the same error anyway. So, apparently there is something else to do in order to make it work.

Hope you can help me.

Ciao

Andrea

PQ-ScreenShot.JPG

 
Posted : 06/09/2019 9:17 am
(@mynda)
Posts: 4761
Member Admin
 

Ah, ok. Thanks for sharing the screenshot. That's an old version of Excel. That button is now called 'Data Source Settings'.

Is the new source and the old source the same data type, e.g. both .csv files or both .xlsx files etc.?

You can try right-clicking the query in the query pane > Load To and changing the load to 'Only Create a Connection'. Then refresh the query, then change the Load to back to the worksheet.

Or, you could try copying the M code out of the Advanced Editor, then create a new blank query and paste the M code into the new query's advanced editor. If that works, you can then delete the original query.

Mynda

 
Posted : 06/09/2019 10:27 pm
(@aremotti)
Posts: 3
Active Member
Topic starter
 

I tried your first suggestion and it worked!

First, I changed the pathname using the 'Data Origin Setup' button.

Then, for the folder, I changed the Data Loading to 'Only Create a Connection' and then back to 'Back to the worksheet'.

Finally, for the xlsx files, that had already been loaded as 'Only Create a Connection', I removed them from the Data Model and then put them back.

Of course, I had to recreate the relationships in the Power Pivot Diagram View, but that is very easy and fast.

Now, updating everything doesn't report any error, and the Pivot Table works again.

 

Thank you very much for your support.

Andrea

 
Posted : 07/09/2019 6:15 am
(@mynda)
Posts: 4761
Member Admin
 

You're welcome, Andrea. Glad I could help 🙂

 
Posted : 08/09/2019 7:40 pm
Share: