> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://knowledge.buildagil.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Power BI: Setting Up a Scheduled Refresh

* [Setting Up the Power BI On-Premises Data Gateway](#3-setting-up-the-power-bi-on-premises-data-gateway)
* [Setting Up a New Connection](#3-setting-up-a-new-connection)
* [Setting Up a Scheduled Update](#3-setting-up-a-scheduled-update)

### Setting Up the Power BI On-Premises Data Gateway
To ensure that Power BI reports display up-to-date data, they can be automatically synchronized with the data sources at regular intervals. A Power BI report is typically created in Power BI Desktop and then published to the Power BI service. A scheduled refresh is only possible after the report [Published](/en/article/project-analysis-with-power-bi-14atsfw/) has been published.

| For information on connecting to the Power BI Connector, see the following article: [Power BI Connector](/en/article/project-analysis-with-power-bi-14atsfw/)

![](https://storage.crisp.chat/users/helpdesk/website/-/d/2/9/f/d29f517da520580/powerbi-bericht-veroffentliche_11vln8t.png)

After publication, a gateway is required to make data from local sources accessible to the report. The On-premises Data Gateway serves this purpose. It is a locally installed Windows application that enables the connection between local data sources and the Microsoft cloud. The standard version of the gateway is used.

| The gateway should not be installed on a computer that might be turned off, in sleep mode, or disconnected from the Internet. Under these circumstances, the gateway cannot run. OAuth 2.0 authentication for the connection requires an interactive login at least once every 90 days.

| You can find installation instructions for the default gateway here: [Download and install Standardgateway](https://learn.microsoft.com/en-us/data-integration/gateway/service-gateway-install#download-and-install-a-standard-gateway)

Once installation and setup are complete, a message will appear indicating that the gateway is online and ready for use.

![](https://storage.crisp.chat/users/helpdesk/website/-/d/2/9/f/d29f517da520580/datagateway-eingerichtet_yvz9cv.png)

To enable access to buildagil data, the buildagil connector is then integrated. The *.mez file provided for this purpose is stored in the following path: `C:\Program Files\On-premises data gateway\CustomConnector`

 If the folder does not exist, it can be created manually. If the file is recognized correctly, the connector will appear in the gateway under the name "buildagil."

| The buildagil connector can be downloaded from the following link: [Download Power BI Connector](https://downloads.buildagil.com/connectors/powerbi)

![](https://storage.crisp.chat/users/helpdesk/website/-/d/2/9/f/d29f517da520580/datagateway-custom-connector-h_cobs03.png)

The next step is to perform the configurations in [Power BI Service](https://app.powerbi.com/).

![](https://storage.crisp.chat/users/helpdesk/website/-/d/2/9/f/d29f517da520580/einstellungen-gateway-offnen_y30tzj.png)

To do this, open the local data gateway settings in the Power BI service.

![](https://storage.crisp.chat/users/helpdesk/website/-/d/2/9/f/d29f517da520580/datagateway-einstellen_7wrjow.png)

 Enable the update options for Power BI here. Once this is done, the gateway is considered fully set up.

![](https://storage.crisp.chat/users/helpdesk/website/-/d/2/9/f/d29f517da520580/datagateway-einstellungen-vorn_zlxyr4.png)

### Setting Up a New Connection
Once the gateway has been successfully set up, a connection is established between the gateway and the report's semantic model. This is done in the Power BI service under "Connections."

![](https://storage.crisp.chat/users/helpdesk/website/-/d/2/9/f/d29f517da520580/verbindung-einrichten_1h0vq5b.png)

There, create a connection of the "Local" type. Select the previously configured gateway and define a name for the connection. Use the buildagil connector as the connection type. Now enter `https://api.buildagil.com/` as the "baseURL." The “relativePath” field can be left blank. "OAuth 2.0" is used for authentication. Next, perform a test connection. For this, you must log in with the same user account that was used when setting up the gateway. The connection can only be created and saved once the test connection has been successfully completed.

![](https://storage.crisp.chat/users/helpdesk/website/-/d/2/9/f/d29f517da520580/verbindung-einstellen_16gcput.png)

### Setting Up a Scheduled Update
Finally, the connection is mapped to the semantic model. This is done in the Power BI service using the "Plan Refresh" role.

![](https://storage.crisp.chat/users/helpdesk/website/-/d/2/9/f/d29f517da520580/aktualisierung-planen_g1bv91.png)

After selecting the desired model, it is linked to the previously defined gateway connection.  

![](https://storage.crisp.chat/users/helpdesk/website/-/d/2/9/f/d29f517da520580/verbindung-dem-semantikmodell-_1ymsvfv.png)

You can then enable and configure the scheduled update. Here, you can adjust the time zone and, by clicking "Add Another Time," change the default setting for the update time.

![](https://storage.crisp.chat/users/helpdesk/website/-/d/2/9/f/d29f517da520580/aktualisierung-einrichten_1mipdxt.png)

If the setup was completed correctly, the next scheduled update will appear in the workspace next to the semantic model.

![](https://storage.crisp.chat/users/helpdesk/website/-/d/2/9/f/d29f517da520580/eingerichtete-aktualisierung-p_1cwgpvs.png)