Sub topic 16
Saving your work and publishing
This chapter covers the last step in the tour: saving your report as a .pbix file and understanding where publishing fits. It assumes you can already load data, build a visual in Report view, inspect columns in Table view, and read relationships in Model view. It also assumes you know that all three views edit one shared data model.
What a .pbix file contains
A .pbix file is the single file Power BI Desktop uses to store your work. It is a compressed package, and it holds more than the report pages you see.
- The report layout: pages, visuals, filters, and formatting.
- The data model: tables, columns, data types, relationships, and measures.
- The Power Query steps that load and shape the data.
- The imported data itself, when the tables use Import mode.
Because the data is inside the file, a .pbix can grow large and can contain sensitive rows. Treat it like the source data when you share it by email or a shared drive.
Saving the file
Use File > Save or press Ctrl+S. On the first save, Power BI Desktop asks for a name and a folder. Later saves overwrite that file.
Power BI Desktop does not save automatically in every setup. It can recover unsaved work after a crash, but you should not rely on that. Save after you change relationships, add measures, or edit Power Query steps, since those changes are hard to redo from memory.
A few details are worth knowing:
- Save As creates a second file. Use it before a risky change, such as deleting a table or changing a relationship.
- Closing with unsaved changes shows a prompt. Choose Save unless you intend to discard the edits.
- The file name becomes the default report name when you publish. Pick a descriptive name now, for example
Sales-Overview.pbix.
Saved view state
The .pbix remembers which report page was active. It also keeps your visuals and their settings. Table view and Model view layouts, such as the position of table boxes in the relationships diagram, are saved too. The layout is only cosmetic, and moving a table box does not change any relationship.
Two formats you may see
| Format | Extension | Purpose |
|---|---|---|
| Power BI report | `.pbix` | The normal working file. Contains the report, the model, and usually the data. |
| Power BI template | `.pbit` | A starting point with the report and model, but no data. Opening it prompts for parameters or a refresh. |
Use File > Export > Power BI template when you want to share the structure without the data. This is useful when the data is confidential.
What publishing means
Saving keeps the file on your computer. Publishing sends a copy of the report and its model to the Power BI service, which is the online part of Power BI. Once published, other people can open the report in a browser, depending on the permissions set in the service.
Publishing does not move your working file. The .pbix stays on your PC, and the service holds a separate copy. If you change the report in Desktop afterward, the service copy does not change until you publish again.
The overall flow looks like this:
Publishing step by step
- Save the report first. Publishing prompts you to save if there are unsaved changes.
- On the Home tab, select Publish.
- Sign in with a work or school account if asked. Personal email addresses such as Gmail are generally not accepted for the Power BI service.
- Choose a destination workspace. A workspace is a shared area in the service that holds reports and datasets. My workspace is your private area, and other workspaces are shared with a team.
- Wait for the success message, then open the link it provides to view the report in the browser.
If the same report name already exists in the chosen workspace, Power BI asks whether to replace it. Replacing overwrites the earlier published version, so confirm that you picked the right workspace.
What appears in the service
After publishing, the service holds two related items: the report and a semantic model. The semantic model is the published form of the tables, relationships, and measures you built in Table and Model views. The report is the pages and visuals from Report view.
This split explains a common point of confusion. Several reports can connect to one semantic model, and the model can be refreshed on its own schedule.
Refreshing published data
Published data is a snapshot taken at publish time. If the source changes later, the report in the service shows old numbers until the semantic model is refreshed.
- For cloud sources, you can usually schedule a refresh in the service after entering credentials.
- For files on your PC or sources inside a private network, the service needs an on-premises data gateway to reach them. Without it, scheduled refresh fails.
- In Desktop, the Refresh button on the Home tab reloads data into your local file only. It does not update the service.
Common problems
- Publish is greyed out or fails at sign-in. You may be using an account that has no Power BI license, or your organization may restrict publishing. Ask your administrator.
- The report shows stale data online. You published, but no refresh ran. Configure a scheduled refresh or republish.
- Refresh fails on a local file. The service cannot see a path such as
C:\Data\sales.csv. Move the file to a cloud location such as SharePoint or OneDrive for work, or set up a gateway. - The file is too large to publish. Publishing has a size limit that depends on your license. Remove unused columns and tables in Power Query, and check whether you need all the rows.
- Someone sees data they should not. Anyone who opens a shared
.pbixcan see the imported data. Share the published report with service permissions instead, or use a.pbittemplate.
Putting the three views to use
Everything you did across Report, Table, and Model views is stored in the one file you save. A publish sends the report and model together. So the order of work from this tutorial ends as follows: load data, check it in Table view, set relationships in Model view, build visuals in Report view, then save and publish.
Exercises
Exercise
You publish a report, then add a new measure in Desktop and save the file. A colleague opens the report in the browser and does not see the measure. Why, and what do you do?
Show answer
Saving only updates the local .pbix. The service holds a separate copy made at the last publish. Select Publish again and replace the existing report in the same workspace so the service copy includes the new measure.
Exercise
A report that reads C:\Data\sales.csv works in Desktop, but scheduled refresh fails in the service. Give two ways to fix it.
Show answer
Move the file to a location the service can reach, such as SharePoint or OneDrive for work, and update the data source. Or install and configure an on-premises data gateway so the service can read the local file.
Exercise
You need to give a partner your report's structure, measures, and relationships but not the sales rows. Which format do you use, and how do you create it?
Show answer
Use a Power BI template (.pbit). Choose File > Export > Power BI template. It keeps the report and model but contains no data.