Query references other queries or steps, so it may not directly access a data source. Please rebuild this data connection

If, when trying to refresh a Power Query, you may get the message ‘Query references other queries or steps, so it may not directly access a data source. Please rebuild this data connection’ and it refuses to continue. In this case it often means that a connection in the Query is looking to an external source which is often on an external network (think Dropbox, OneDrive, SharePoint etc)

Change the Privacy Settings

To get it to work again you can try the following. Note that you may need to do this on all the computers that use the Power Query and redo if you reload/ change your computer.

Access the Power Query windows. Below one way to do it by right clicking on any one of the queries and clicking on Edit.

may not directly access a data source

Next click on ‘File’, then ‘Options and Settings’ and choose ‘Query Options’ as per below.

may not directly access a data source

Lastly on the Global part (very important unless you want to do it every time), choose ‘Privacy’ and the ‘Always ignore Privacy Level settings’. If you work in a corporate you may need to get permission from IT.

may not directly access a data source

You should then be able to close the query and when you refresh it will access the required files.

PowerQuery Online Course

Power Query close and load to greyed out

Solution to PowerQuery Create Connection Only being Greyed Out