To add a gateway in Power BI, follow these steps:
- Open Power BI Desktop and go to the “File” menu.
- Click on “Options and settings” and then select “Data source settings”.
- In the “Data source settings” dialog box, click on the “Gateway connection” tab.
- Click on the “Add gateway” button.
- Follow the on-screen instructions to download and install the gateway.
- Once the gateway is installed, go back to Power BI Desktop and select the “Manage gateways” option from the “File” menu.
- Click on the “Add gateway” button and provide the necessary details like the gateway name and the email address associated with the Azure Active Directory account.
- Click on the “Save” button to create the gateway.
- Now, you can configure data sources and data sets to use this gateway by selecting the gateway from the drop-down menu in the “Data source settings” dialog box.
Here is an example to illustrate the process:
Let’s say you have an on-premises SQL Server database that you want to connect to Power BI using a gateway.
- Install the gateway on a machine that has access to the SQL Server database.
- Open Power BI Desktop and go to the “File” menu.
- Click on “Options and settings” and then select “Data source settings”.
- In the “Data source settings” dialog box, click on the “Gateway connection” tab.
- Click on the “Add gateway” button and follow the on-screen instructions to download and install the gateway software.
- Once the gateway is installed, go back to Power BI Desktop and select the “Manage gateways” option from the “File” menu.
- Click on the “Add gateway” button and provide the necessary details like the gateway name and the email address associated with the Azure Active Directory account.
- Click on the “Save” button to create the gateway.
- Now, in the “Data source settings” dialog box, select the gateway you just created from the drop-down menu.
- Click on the “Add” button to add a data source.
- Select the SQL Server option and enter the necessary connection details like the server name, database name, and authentication method.
- You can test the connection to make sure it is working correctly.
- Click on the “Save” button to save the data source settings.
Now, whenever you create a report or a dataset using this data source, Power BI will use the gateway to securely connect to the on-premises SQL Server database.