Changing the Path of Data Source in Power BI

The display of the path would involve a credential prompt, followed by the data source settings UI. If a Label value is defined, the data source path value will not be visible. For functions that have a Uri parameter, there is special handling in the Power Query UI for dealing with Uri-based data source paths. The data source credential type is encrypted and the connection is established.

While initiating a new dataflow project on
Power Query
Online, you can opt for an on-premises
data gateway
that suits your
data sources
requirements, from the available options during the data retrieval process. The following article illustrates the steps to change or designate a gateway for a pre-existing dataflow project.


Ensure that the required gateways are registered under your tenant and accessible to the dataflow project authors prior to modifying a gateway. For further information on data gateways, refer to Using an on-premises data gateway in
Power Platform dataflows

Changing the gateway

This article provides an instance of altering the gateway in a dataflow project by demonstrating a query that links to a local folder.

In the past, the query relied on “Gateway A” to connect to the folder. However, due to new company policies, “Gateway A” no longer has access to the folder. Instead, a new gateway, “Gateway B,” has been registered and granted access to the required folder. The objective is to modify the dataflow project to use the newly registered “Gateway B” instead of “Gateway A”.

Image with a query that has an error message related to the data gateway being unreachable or offline.

To change the gateway:

  1. From the


    tab in Power Query, select



  2. From the drop-down
    menu, select

    Project Options


    Drop-down menu found in the Options button inside the Power Query Home tab with the Project options button emphasized.

  3. In the

    Project options

    dialog box, select the gateway to use for your project, in this case, Gateway B.


    Image of Project options dialog box with the drop-down menu listing None, Gateway A, and Gateway B.

    are stated first.



    If there were recent changes to your gateways, select the small refresh icon to the right of the drop-down menu to update the list of available gateways.

    are presented afterwards.

  4. After selecting the correct gateway for the project, in this case Gateway B, select


    to go back to the Power Query editor.

Validate your data source path

We suggest verifying that your queries are connecting to the intended
Data source
s by examining your
data source
paths after modifying your data gateway.


The M engine utilizes both the type and location of a data source to identify it.

The connector or data
source function
being utilized, for instance, SQL Server, folder, Excel workbook, or other options, is determined by the type.

The value of the path is obtained through the mandatory parameters of your data source function and, in this instance, it pertains to the directory path.

To validate the data
source path
, one can examine the parameters being used in the query where the data source function is employed. In this scenario, there is only one query that links to a folder, and it contains the “Source” step with the data source path specified. To view the parameters used for your data source function, you can click twice on the “Source” step to display the dialog. Confirm that the folder path or the proper parameters for your data source function are correct with respect to the used gateway.

Image of the results of double-clicking the Source in the Power Query Query settings pane, with the Folder path shown from the example in this article.

Modify authentication

To alter the login information for your data source, access the Power Query editor ribbon and click on
Get data
to open the
Choose data source
dialog box. From there, establish a connection to your data source by either creating a new one or using an existing connection. In this particular scenario, the Folder connector is being utilized.

Choose data source dialog with the folder connector emphasized.

While in the Connection settings, you have the option to create a fresh connection or modify an existing connection for your data source.

Connection settings dialog for the Folder connector.

Once you have specified the connection details, click on the “Next” button located at the bottom-right corner to confirm that your query is being loaded in the Power Query editor.


Performing this action is equivalent to reconnecting with your data source. However, by repeating the process, you are essentially re-specifying the authentication technique and login details for accessing your data source.

Frequently Asked Questions

Posted in Uncategorized