Sub topic 10
Checking that the report works in the service
This chapter assumes you have already published a report from Power BI Desktop, that you can open the workspace in the Power BI service, and that you know a report and its semantic model are separate items. It covers what to check after publishing and how to read the failures you may see.
Why a published report can still be broken
Publishing uploads the .pbix file. It does not prove that the report works for the people who will open it. The service runs your report in a different place from Desktop:
- Desktop uses your own machine, your Windows sign-in, and your local files and drivers.
- The service uses a cloud engine and stored credentials. For on-premises or local sources it also needs a gateway.
- Desktop shows the data you last loaded. The service shows the semantic model as it was published, until a refresh runs there.
A report can look perfect in Desktop and still show empty visuals in the service because of a credential, gateway, permission, or time zone difference. A short, repeatable check catches these problems before your audience does.
The verification pass
Work from the outside in. First confirm the items exist, then confirm the data is current, then confirm the visuals render, and finally confirm what other users see.
Step 1: Confirm the items exist
Open the workspace and look at the content list. You should see two items with the same name, one of type Report and one of type Semantic model. If only one appears, you may be looking at the wrong workspace, or the publish may have failed. Check the workspace name at the top of the page, because Desktop remembers the last destination you chose.
Then open the Lineage view. It shows the chain from data sources to the semantic model to the report. It confirms that the report is bound to the semantic model you expect. This matters if you have several models with similar names, for example a test copy and a production copy.
Step 2: Confirm the data is current
Open the semantic model list and read the Refreshed column and the Next refresh column.
- The Refreshed time for a newly published import model is usually the publish time. It reflects the data loaded in Desktop, not a refresh in the service.
- Next refresh is empty until you configure a schedule.
Compare one or two numbers in the service report with a figure you trust, such as a total from the source system. Pick numbers that cross several tables, because a broken relationship often shows as a wrong total while each table looks fine alone.
Step 3: Open the report and test every page
Open the report from the workspace in reading view. Do not stop at the first page. Check:
- Every page loads without a banner or error icon.
- Every visual shows data, not a blank frame or a spinning indicator that never ends.
- Slicers and cross-filtering work. Select a value in one visual and confirm the others respond.
- Drillthrough, tooltips, and bookmarks navigate to the pages you expect.
- Date and time values match what you expect. See the time zone note below.
If a visual shows an error such as "Can't display the visual", select See details. The message includes an error code, and a copy option lets you paste it into notes or a support ticket. Many errors point at one of the causes in the next table.
| Symptom | Likely cause | Where to fix it |
|---|---|---|
| Every visual is empty or shows a credentials error | Data source credentials are missing or expired | Semantic model settings, Data source credentials |
| "Cannot load model" or a gateway message | Source is on-premises or local and no gateway connection is mapped | Semantic model settings, Gateway and cloud connections |
| Only some visuals fail | A measure or column uses a function or source that fails in the service | Open the visual's error details, then fix the DAX or query |
| Numbers are old | No refresh has run since publishing | Run **Refresh now**, then set a schedule |
| You see data, a colleague sees none | Row-level security role, or no access to the item | Security on the model, workspace role, or sharing |
| Dates are shifted by hours | Time zone difference between your machine and the service | Remove reliance on local time in queries or measures |
The time zone gotcha
Functions that return the current time, such as DateTime.LocalNow() in Power Query or NOW() in DAX, return the time on the machine running the engine. In the service that is UTC, not your local time. A "today" filter built on these functions can be off by a day for hours at a time. If your report depends on the current date, test it in the service near the end of your local day, or compute the date with an explicit offset.
Step 4: Check the refresh history
Open the semantic model's menu and choose Refresh, then Refresh history. You can also use Refresh now to start a manual refresh. Watch the status:
- Completed means the refresh succeeded.
- Failed includes an error message and a time. Read the message, because it usually names the data source and the problem.
- Unknown with no end time usually means the refresh is still running.
A manual refresh is a good test of credentials and gateways even if you have not set a schedule. If it fails, the schedule would have failed too. Chapter content on credentials and scheduled refresh covers the settings in detail. At this stage you only need to read the result and know which setting to open.
If refresh succeeds but the report still looks old, reload the report page. A report that was open during the refresh does not always update until you reload it.
Step 5: See the report as other people see it
You are probably an Admin or Member of the workspace, so your view is more permissive than most readers'. Check three things.
Row-level security
Row-level security (RLS) filters rows by role. It applies to people who read the content, such as Viewers and people given access through sharing or an app. Workspace members with edit permission on the semantic model are not restricted by RLS, so the report looks complete to you even when it is correct for them.
To test it in the service, open the semantic model's menu, choose Security, select a role, and use the Test as role option. The report opens with a banner showing the role you are viewing as. Confirm the numbers shrink to what that role should see. You can also add a user name to test as a specific person when the role uses a user-name filter such as USERPRINCIPALNAME().
Access to the report
Confirm who can open the report. Workspace roles give access to everything in the workspace. Individual sharing and apps give narrower access. The next chapter covers these choices. For now, ask one real colleague, or use a test account in the Viewer role, to open the report link and confirm it loads.
Browser and capacity effects
If a report is slow only in the service, try opening it in a private browser window to rule out extensions or cached state. If the workspace is on shared or limited capacity, a large model may refresh or render slowly. Slow is different from broken, so note the load time and compare it with Desktop.
Scripted check
You can check the same facts from a script. This is useful after an automated publish, where nobody opens the report. The script finds the report, reads its semantic model ID, and reads the latest refresh entries through the REST API.
Connect-PowerBIServiceAccount
$ws = Get-PowerBIWorkspace -Name 'Sales Analytics'
$report = Get-PowerBIReport -WorkspaceId $ws.Id |
Where-Object { $_.Name -eq 'Sales' }
if (-not $report) {
throw "Report 'Sales' was not found in workspace '$($ws.Name)'."
}
Write-Output "Report URL: $($report.WebUrl)"
Write-Output "Semantic model ID: $($report.DatasetId)"
$url = "groups/$($ws.Id)/datasets/$($report.DatasetId)/refreshes?`$top=3"
$result = Invoke-PowerBIRestMethod -Url $url -Method Get | ConvertFrom-Json
if ($result.value.Count -eq 0) {
Write-Output 'No refresh has run in the service yet.'
} else {
$result.value | Select-Object status, startTime, endTime | Format-Table
}An empty refresh list is expected for a freshly published import model that has never refreshed in the service. A script that must fail on a bad refresh can check that the most recent entry has status equal to Completed.
Keep in mind that this confirms the items and the refresh state. It does not confirm that visuals render. For that you still need a person, or a test account, to open the report.
Common mistakes
- Checking only the first page. A broken visual on page four is found by the audience first.
- Testing only as an Admin. RLS and sharing problems stay hidden.
- Treating a successful publish as a successful refresh. They are separate events.
- Comparing the service with an old Desktop file. Make sure you compare against the same version that you published.
- Ignoring the error details. The copied error text usually names the failing source or column.
A short checklist
- The workspace shows one report and one semantic model with the expected names.
- The Lineage view links the report to the intended model.
- Spot-check numbers match a trusted figure.
- Every page and visual renders, and slicers and navigation work.
- A manual refresh completes, and refresh history shows Completed.
- Test as role shows the right data for each security role.
- A non-admin account can open the report.
Exercise
You publish a report and open it in the service. All visuals show data, but the numbers match last week's. The semantic model's Refreshed column shows the publish time. What is the most likely explanation, and what should you do?
Show answer
The service model holds the data that was in the .pbix file when you published, so it is only as current as your last Desktop refresh. No refresh has run in the service. Run Refresh now on the semantic model, check Refresh history for a Completed status, and then set up credentials and a schedule so it stays current.
Exercise
A colleague who is a Viewer says the report is empty. You, as a workspace Admin, see full data. The model defines RLS roles. List two things you would check.
Show answer
First, check that the colleague is assigned to a role in the model's Security settings, because a user with no role sees no data when roles exist. Second, use Test as role (or test as that user name) to confirm the role's filter returns rows. You can also confirm that their user name matches what a USERPRINCIPALNAME() filter expects. Remember that Admins and Members are not restricted by RLS, which is why you saw everything.
Exercise
Your report filters to "today" using a Power Query step based on DateTime.LocalNow(). In the service, late in your local evening, it shows tomorrow's data or none. Why?
Show answer
In the service the engine runs in UTC, so DateTime.LocalNow() returns UTC time rather than your local time. Near the end of your local day, UTC may already be the next calendar day. Avoid relying on local time functions, or apply an explicit time zone offset in the query or measure.