Sub topic 5
Publishing from Power BI Desktop step by step
This chapter walks through the publish action in Power BI Desktop, from the pre-flight checks to the confirmation dialog. It assumes you can build a simple report in Power BI Desktop and have a work or school account that can sign in to the Power BI service. It also assumes you know that a workspace is a shared container in the service and that workspace roles control what each person can do there. Those ideas were covered in earlier chapters, so this chapter only recalls the parts that affect publishing.
What the Publish button does
Publishing copies the contents of your open .pbix file to a workspace in the Power BI service. The file contains two things: the report pages (visuals and layout) and the data model (tables, relationships, measures, and the queries that load data). The service stores them as two separate items, a report and a semantic model. The next chapter looks at those items in detail. Here the focus is on how to get them there.
Publishing is a one-way upload. Desktop sends a copy of the file, and the service keeps no live link back to the file on your disk. If you edit the .pbix afterward, nothing changes in the service until you publish again.
Before you publish: a checklist
Most failed or confusing publishes come from a problem that could have been caught first. Check these items:
- Save the file. Desktop asks you to save before it publishes. Saving first avoids losing work if the upload is interrupted.
- Refresh the data in Desktop. Select Refresh on the Home tab so the model you upload contains current data. Publishing uploads the data that is cached in the file, so a stale file produces a stale report until the service refreshes it.
- Confirm which account you are signed in with. The account shown in the top right corner of Desktop decides which workspaces you see. A personal account and a work account often have access to different workspaces.
- Confirm your role in the target workspace. You need the Contributor, Member, or Admin role to publish. Viewers cannot.
- Confirm the license and capacity. Publishing to My workspace works with a Power BI Pro or Premium Per User license. Publishing to a shared workspace generally requires one of those licenses too, unless the workspace is on a capacity that allows free users. Your administrator can tell you which applies.
- Check the sensitivity label, if your organization uses them. A required label may need to be chosen before the upload is allowed.
Step by step: publishing from Desktop
Step 1: Sign in
In the top right corner of Power BI Desktop, select Sign in and use your work or school account. If you are already signed in, check that the displayed name is the right one. To switch, select your name and choose Sign out, then sign in again.
Step 2: Start the publish
On the Home tab, select Publish. If the file has unsaved changes, Desktop asks you to save. Choose a file name and location, and select Save.
Step 3: Choose the destination
The Publish to Power BI dialog lists the workspaces where your account can publish. It shows My workspace and every shared workspace in which you hold a role that allows publishing. Select the destination and choose Select.
Pick the destination with care. Two reports with the same name in different workspaces are unrelated items. Publishing to the wrong one does not touch the other, but it can expose a draft to the wrong audience if that workspace has many members.
Step 4: Wait for the upload
Desktop shows a progress message while it sends the file. Larger models take longer, because the cached data travels with the file. When the upload finishes, Desktop shows Success! and a link of the form Open 'FileName.pbix' in Power BI.
Step 5: Handle a name conflict if asked
If the destination already holds a semantic model with the same name, Desktop asks whether to Replace it. The choices are:
- Replace overwrites the existing semantic model and report with your new upload.
- Cancel stops the publish and leaves the workspace unchanged.
The full rules for conflicts, including how they differ in scripted publishing, are in the republishing chapter. For now, treat Replace as a decision that changes what other people see.
Step 6: Open the result
Select the link in the success dialog to open the report in the browser. Opening it right away is the quickest way to confirm that the upload landed in the workspace you intended.
The sequence of events
The diagram below shows the order of the exchange between you, Desktop, and the service.
What publishing does not carry over
The upload moves the file's contents, but several things stay behind or need separate setup:
- Data source credentials. Desktop uses the credentials you typed while building the report. The service does not receive them. Without credentials stored in the service, scheduled refresh fails. That setup is covered in the chapter on credentials and gateways.
- Gateway connections. If your data sits on a network the service cannot reach, such as an on-premises SQL Server, a gateway must be set up for refresh to work.
- Scheduled refresh. A refresh schedule is created in the service after publishing. The .pbix file does not contain one.
- Sharing and access. The report is visible to the roles in the workspace. Sharing it with others is a separate step.
- Local parameters and file paths. A query that reads
C:\Data\sales.xlsxworks on your machine and fails in the service, because the service cannot read your disk. Move the file to a location the service can reach, such as SharePoint or OneDrive for work, or use a gateway.
Common errors and what they mean
| Symptom | Likely cause | What to do |
|---|---|---|
| The workspace is missing from the dialog | Wrong signed-in account, or the role is Viewer | Check the account name, then ask a workspace Admin for the Contributor role or higher |
| Message that you need a Pro license | The account has no Pro or Premium Per User license, and the workspace is not on a capacity that allows free users | Ask your administrator for a license, or publish to a workspace on suitable capacity |
| Publish fails partway with a size error | The model exceeds the size limit for the license or capacity | Reduce the data, remove unused columns, or move the workspace to a larger capacity |
| Publish succeeds but the report shows no data after the first open | Data was not loaded into the model before saving, or refresh has not run | Refresh in Desktop and publish again, or run a refresh in the service |
| Publish blocked by a sensitivity label message | Your organization requires a label | Apply a label in Desktop, then publish again |
| Report works in Desktop and fails in the service | A local file path or missing credentials | Move the source to a reachable location and set credentials in the service |
Edge cases worth knowing
Publishing to My workspace. This workspace is private to you. It is useful for testing, but a report there cannot be shared the way a shared workspace item can. Use it as a scratch area before you publish to a team workspace.
Reports connected live to a semantic model. If your .pbix connects to an existing semantic model in the service instead of holding its own data, publishing uploads only the report. No new semantic model is created, and the report stays tied to the original one. You also need the right permission on that semantic model.
Large models. A model with a large cached data set can take a long time to upload. If the connection drops, the upload fails and you must start again. Trimming unused columns before publishing shortens the upload and reduces the chance of a failure.
Multiple people editing. The .pbix file is not a collaborative document. If two people publish different versions with the same name, the last publish wins. Agree on one owner of the source file, or keep it in a version-controlled location.
Signed in as the wrong tenant. Users who work with more than one organization can end up signed in to a tenant that has none of their workspaces. Sign out and sign in with the correct organizational account.
Putting it together
A reliable routine for a single publish looks like this:
- Refresh the data and save the file.
- Check the account and workspace role.
- Select Publish, pick the workspace, and wait for the success dialog.
- Open the link and confirm the report loads in the right workspace.
- Set credentials and a refresh schedule in the service if the data needs to stay current.
Following this order means each problem shows up at the step that causes it, which makes it easier to find.
Exercises
Exercise
You open the Publish dialog in Power BI Desktop and the team workspace "Sales Analytics" is not in the list, although a colleague can see it. Name two likely causes and how you would check each.
Show answer
First, you may be signed in with a different account than the one that has access. Check the name in the top right corner of Desktop, and sign out and in again with the work account if it is wrong. Second, your role in the workspace may be Viewer, which cannot publish. Open the workspace in the browser, check your role under Manage access, and ask an Admin for Contributor or higher if needed.
Exercise
A report built on an Excel file at C:\Data\sales.xlsx publishes successfully and displays data, but the scheduled refresh fails. Why does this happen, and what are two ways to fix it?
Show answer
The service cannot read a path on your local disk, so it cannot reload the data. The displayed data is just the copy cached in the file at publish time. You can move the file to a location the service can reach, such as SharePoint or OneDrive for work, and update the source in Desktop, then republish. Alternatively, set up an on-premises data gateway that can reach the file, and configure the data source to use it.
Exercise
Put these actions in the correct order for a clean first publish: open the link to the report, refresh data in Desktop, choose a workspace, select Publish, set credentials and refresh in the service.
Show answer
Refresh data in Desktop, select Publish, choose a workspace, open the link to the report, then set credentials and refresh in the service.