In Power BI Desktop, you connected directly to your on-premises SQL Server database, but the Power BI service requires a data gateway to act as a bridge between the cloud and your on-premises network. Follow these steps to add your on-premises SQL Server database as a data source to a gateway and then connect your dataset to this data source.
-
Sign in to Power BI. In the upper-right corner, select the settings gear icon and then select Settings.
-
On the Datasets tab, select the dataset AdventureWorksProducts, so you can connect to your on-premises SQL Server database through a data gateway.
-
Expand Gateway connection and verify that at least one gateway is listed. If you don't have a gateway, see the Prerequisites section earlier in this tutorial for a link to the product documentation for installing and configuring a gateway.
-
Under Actions, expand the toggle button to view the data sources and select the Add to gateway link.
-
On the Gateways management page, on the Data Source Settings tab, enter and verify the following information, and select Add.
-
On the Datasets tab, expand the Gateway connection section again. Select the data gateway you configured, which shows a Status of running on the machine where you installed it, and select Apply.