Problem Statement: To set up data gateway in Power BI service for on-premises data source and to set up scheduled refresh for the Power BI file.
For demonstration, the excel file is taken as the data source which is present on the local machine.
Step 1: Upload the power BI into the Power BI service. In the Power BI service, at the top right corner click on the download option and select Data gateway.
Step 2: Choose any one of the modes from two modes which are standard and personal. Complete the installation of the gateway. Currently, standard mode is installed for this example. While installing the gateway, provide the same email address which is used for logging in to the Power BI service and add a suitable name for the gateway.
Step 3: Go to the Power BI service and click on the Schedule refresh option of the file which is uploaded.
Step 4: Expand Gateway connections option. Click on the down arrow -> Click on Add to gateway.
Step 5: Give the name to your connection. Enter the username and password of your windows machine. Also, privacy levels can be set. Currently it is Organizational. Click on create.
Step 6: It will redirect back to the Datasets page. Under Gateway connections, select the connection which is just created from the dropdown menu present under Maps to section. Click on Apply.
Step 7: Under Refresh section, enable the schedule refresh option and set the time for refresh.
Conclusion: Gateway is created from an on-premises data source (Excel) to the Power BI service. Power BI file will be refreshed automatically.