Sub topic 3
Reading Refresh History
Assume you know Power BI datasets (semantic models), workspaces, and basic Windows networking. Refresh history shows whether imported data updates completed and why they failed.
Read the history first
In the Power BI service, open the workspace, select the semantic model, and open Refresh history. Check:
- Status: Completed, Failed, or Cancelled.
- Start and end times: useful for finding slow refreshes.
- Error details: identify credentials, gateway, timeout, or source errors.
- Duration: compare normal runs with recent failures.
A successful refresh does not prove that the source data is correct. It proves that Power BI completed the refresh operation.
Gateway clusters and high availability
A standard gateway cluster contains multiple gateway members. The Power BI service can use another member when one member is offline. Install members on separate machines to avoid one machine becoming a single point of failure. Keep their gateway versions compatible and test that every member can reach the required data sources.
Network ports, accounts, and security
The gateway normally makes outbound connections to Azure Service Bus. It does not require inbound ports to be opened on the corporate firewall. Test connectivity from the gateway machine:
Test-NetConnection -ComputerName watchdog.servicebus.windows.net -Port 9350Run the gateway with a dedicated service account that has only the permissions it needs. Store source credentials in the gateway data-source settings, not in a report or script. Protect the recovery key because it is required to restore or move the gateway.
Keeping a gateway healthy
Apply gateway updates during a planned maintenance window. Record the recovery key in an approved secret store. Review gateway logs when refresh history gives only a generic error. Monitor disk space, Windows service status, CPU, and memory on each gateway member.
Troubleshoot common failures
Match the error to the layer:
- Credential errors: verify the data-source credentials and permissions.
- Data-source errors: test the server, database, file path, or query from the gateway machine.
- Gateway offline: check the Windows service and outbound firewall rules.
- Timeout errors: inspect slow queries, source load, and refresh duration.
- Mapping errors: confirm the dataset uses the exact gateway server and database names.
Trigger and inspect a refresh with the REST API
Connect-PowerBIServiceAccount
$groupId = '<workspace-id>'
$datasetId = '<dataset-id>'
$body = '{"notifyOption":"MailOnFailure"}'
Invoke-PowerBIRestMethod -Method Post -Url "groups/$groupId/datasets/$datasetId/refreshes" -Body $body
Invoke-PowerBIRestMethod -Method Get -Url "groups/$groupId/datasets/$datasetId/refreshes?`$top=5"The first request starts a refresh. The second returns recent attempts and their status.
Incremental refresh for large tables
Incremental refresh divides a large table by date. Power BI refreshes recent partitions more often and leaves older partitions unchanged. This reduces source load and refresh duration, but it requires a suitable date or time column and correct policy settings in Power BI Desktop.
Exercise
A refresh fails because the gateway is offline. What should you check first?
Show answer
Check the gateway Windows service, the machine's network access, and outbound connectivity before changing the dataset.