The following steps will help you schedule a data refresh for a Power BI report connecting to an on-premises SQL Server via a gateway.
On-Premises Data Gateway Configuration
Installing and configuring the Power BI On-Premises Data Gateway on a machine with network access to the SQL Server.
Sign in to the Power BI Admin Account and check that the gateway is online in Power BI Service under Manage Gateways.
Add an SQL Server data source to the gateway by providing server details and the authentication mode to use (Windows, Basic, or OAuth).
Scheduled Data Refresh in Power BI Service
In Power BI Service, navigate to the Datasets → Settings.
For the Gateway connection, check that the dataset is mapped to the configured gateway.
For Scheduled Refresh, turn on refresh and specify the frequency (e.g., daily or hourly).
Enter valid credentials for the SQL Server connection.
Troubleshoot Refresh Failures
Above all, check that the gateway is online and has access to the SQL Server.
On firewall settings, check that Power BI can reach the on-premise server.
Ensure that the credentials in Power BI Service match those you have on the SQL server.
Using the Power BI Service Refresh History, view refresh failures to assist with diagnostics and resolve errors such as timeouts or authentication problems.