Ellery Leung
Ellery Leung

Reputation: 675

How to test if PowerBI schedule refresh is working?

I setup a schedule refresh for several reports according to Microsoft documentation.

However, some of the reports may require at least daily update and I cannot wait till next day to see if it works. It is too slow.

So I would like to ask if there are any way in the powerbi.com website to test if schedule refresh works?

Thank you very much in advance for all your help.

Updated on 24/7:

First of all thanks for all comments and responses.

Here is what I want to do:

I want to refresh the dataset manually, so that if it works perfectly, I can believe that the schedule refresh will also work fine.

However, the "Refresh Now" button in dataset mentioned by @Andrey seems only refresh the cache version of the data, not the latest data.

Because it said "Cache Refresh History": Cache refresh history, not real time data history

While the status said it is "Completed", actually it is not. The data is not updated at all.

That's why I want a "Real-time Data update" button that runs the same process as schedule refresh.

Thank you very much in advance for all your help.

Upvotes: 0

Views: 979

Answers (1)

Andrey Nikolov
Andrey Nikolov

Reputation: 13460

First, an e-mail will be sent in case of refresh failure. Make sure the checkbox Send refresh failure notifications to dataset owner is selected (assuming you are the dataset owner) when configuring the scheduled refresh. You can also specify additional recipients for these notifications.

enter image description here

You can also check the refresh history of a dataset(s) using Get Refresh History and Get Refresh History In Group APIs. For example with the following PowerShell script you can get information about the last 3 refreshes of particular dataset and do some automation in case of failure:

Import-Module MicrosoftPowerBIMgmt
Import-Module MicrosoftPowerBIMgmt.Profile

$password = "xxxxxxxxxxxxxxxxxxxxx" | ConvertTo-SecureString -asPlainText -Force
$username = "[email protected]" 
$credential = New-Object System.Management.Automation.PSCredential($username, $password)

Connect-PowerBIServiceAccount -Credential $credential

$response = Invoke-PowerBIRestMethod -Url 'groups/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/datasets/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/refreshes?$top=3' -Method Get

$response_json = ConvertFrom-Json $response

# Write-Output $response_json

$response_json.value | ForEach-Object { Write-Output "Status: $($_.Status) , Time completed: $($_.endTime)" }

Disconnect-PowerBIServiceAccount

If you want to trigger a refresh of the dataset instead, change the method of the API call above to be Post.

From Power BI Service site, you can manually refresh a dataset from the workspace view for example:

enter image description here

or go to dataset's settings to see its refresh history:

enter image description here

Upvotes: 1

Related Questions