Home Course home Curriculum Learner dashboard Skill tree Business projects Datasets Final project
🖥️ Module 1 · Power BI Desktop Beginner LESSON 10 / 72

Saving .pbix Files & Understanding Workspaces

22 min 5 quiz questions 1 practical challenge 4 syllabus topics

A .pbix file is not a document — it is a container holding your queries, your model, your data and your report. Understanding what is inside it explains file sizes, sharing problems, and the difference between a .pbix and a .pbit. This lesson also connects your local file to the workspace concept you will meet properly in Module 12.

Lesson 10 of 72 · Power BI Desktop 14%
01

Learning Objective

People treat .pbix files like Word documents and are then surprised by 300 MB files, broken sharing, and colleagues who cannot refresh. Knowing what is inside removes all of that surprise.

By the end of this lesson you will be able to
  • Describe what a .pbix file actually contains
  • Explain the difference between .pbix and .pbit and when to use each
  • Predict why a .pbix file is large and what would shrink it
  • Organise project files so they remain workable months later
  • Explain how a local file relates to a workspace in the Power BI service
02

Why This Matters

Three practical situations this explains.

  • "Why is my file 400 MB?" Because with Import storage mode, the data is inside the file. Every row you loaded and never used is still in there.
  • "I sent the file and they cannot refresh it." Because the .pbix stores the connection path, not the source. If it points at C:\Users\you\Desktop\sales.csv, nobody else can refresh it.
  • "I want to share the design but not the data." That is precisely what a .pbit template is for.
There is no autosave for local .pbix files
Power BI Desktop does not autosave to disk the way Office apps do. If it crashes — and on a large model under memory pressure, it can — unsaved work is gone. Ctrl+S should be a reflex, not a decision.
03

Concept

What is inside a .pbix

A .pbix is a compressed archive. Four things live in it:

Contents of a .pbix
ComponentWhat it isSize impact
QueriesYour Power Query M code — the recipe for getting and shaping dataNegligible. It is text
ModelTable definitions, relationships, DAX measures, calculated columns, hierarchies, RLS rolesSmall, except calculated columns which materialise per row
DataThe imported rows, compressed by the VertiPaq engineThis is almost all of the file size
ReportPages, visuals, their fields, formatting, bookmarks, themeSmall
Which is why storage mode determines file size
An Import model contains the data, so the file can be hundreds of megabytes. A DirectQuery model contains only the query definitions, so the file is typically well under a megabyte regardless of how much data sits behind it. Module 2 Lesson 4 covers the trade-off in full.

.pbix versus .pbit

.pbix.pbit
Contains dataYes (Import mode)No
Contains queries, model, reportYesYes
Typical sizeMegabytes to hundreds of megabytesKilobytes
On openingOpens as-isPrompts for any parameters, then refreshes from source
Use it forYour working fileSharing a design, or a reusable starting point

Save a template with File › Export › Power BI template. If your queries use parameters — a file path, a server name, a date range — the .pbit prompts for them on open, which makes it a genuinely useful distribution mechanism. Module 3 Lesson 8 covers parameters.

Why files get large, and what actually helps

File size drivers
CauseWhyFix
High-cardinality columnsVertiPaq compresses by distinct value. A column with millions of unique values compresses poorlyRemove it, or reduce precision (drop the time component from a datetime)
Columns you never useEvery loaded column is stored, used or notRemove them in Power Query. This is usually the biggest single win
Auto date/timeCreates a hidden date table per date columnTurn it off and build one proper date table
Calculated columnsMaterialised per row and compress worse than imported columnsMove the logic to Power Query, or make it a measure instead
Loading more history than you needTen years loaded when two are reported onFilter in Power Query, ideally with query folding so the source does the work
Removing a column in Power Query genuinely removes it from the model. Hiding a column does not — it is still loaded and still stored. If your goal is a smaller file, hiding achieves nothing.

Local files and workspaces

Your .pbix lives on your machine. A workspace is a container in the Power BI service. Publishing uploads the model and the report into a workspace.

The .pbix remains your source of truth
Editing a report in the service and forgetting to bring the change back into your local file is a real and common problem. The next time you publish from Desktop you overwrite the service-side edit. Decide where authoritative editing happens — for most teams, that is Desktop — and stick to it.
04

Visual Explanation

Where the bytes actually go in a typical Import-mode file.

Those proportions are illustrative of the general pattern rather than a measured average — the exact split varies with model complexity. The conclusion holds regardless: if you want a smaller file, remove data, not visuals.

A sensible project folder

Folder structure that survives six months
PathContains
/project-name/The project root
  /data/Source files. Never edit these by hand
  /pbix/Working .pbix files, versioned
  /templates/.pbit exports
  /docs/KPI definitions, model diagram, cleaning log
  README.mdWhat this is, who it is for, how to refresh it
Version by name, not by hope
sales-report-v1.pbix, sales-report-v2.pbix. Unglamorous, and it has rescued a great many people. Power BI Desktop has no version history and no undo across sessions. Git does not help much either — .pbix is a binary archive, so Git stores whole copies and cannot diff them meaningfully.
05

Power BI Demonstration

Save and note the size
File › Save as. Then look at the file size in Explorer. Compare it against the source CSV — the .pbix is usually smaller, because VertiPaq compresses well.
See what removing a column does
In Power Query, remove three or four columns you are not using. Close & Apply, save again, and compare the size. The drop is often larger than you would expect.
Export a template
File › Export › Power BI template. Give it a description — it appears when someone opens the .pbit. Note the file size against the .pbix.
Open your own template
Open the .pbit. It refreshes from source rather than opening stored data. If you had parameters, it would prompt for them first.
Check the data source settings
Home › Transform data › Data source settings. This shows every source the file references, including the full local path. This is exactly why sending a .pbix to a colleague often leaves them unable to refresh.
Change a source path
In the same dialog, select a source and click Change Source. Useful when files move — and far better than rebuilding the query.
Publish (if you have a work account)
Home › Publish, choose a workspace. Then open the service and find the report and the semantic model as two separate items.
Look at what publishing created
In the workspace, note that one publish produced two artifacts: a report and a semantic model. They are separate objects and can be managed separately. Module 12 Lesson 2 covers why that matters.
HomeTransform dataData source settings
06

Example Dataset

This lesson is conceptual and needs no download — it uses the sample data shown inline above. The next lesson that requires a file will link it here.

You can still browse every dataset in the course from the dataset library.

07

Step-by-Step Exercise

Set up a project folder
Create the structure from section 04: /data/, /pbix/, /templates/, /docs/. Move your files into it.
Measure your baseline
Save your current model and record the file size.
Remove unused columns
In Power Query, remove every column you are not actually using — for the sales file that probably includes ShipDate, UnitPrice and COGS if your report does not use them. Close & Apply and record the new size.
Turn off auto date/time if you have not
Options › Current File › Data Load. Save and record the size again.
Export a template and compare
Export a .pbit and compare it against the .pbix. The ratio tells you exactly how much of your file is data.
Write a README
In /docs/, write a short file covering: what this report answers, where the data comes from, how to refresh it, and any assumptions. Ten minutes now, hours saved later.
08

Expected Result

You should see a measurable size reduction from removing columns, and a dramatic difference between the .pbix and the .pbit.

Indicative results
StepWhat you should observe
Baseline .pbixTypically smaller than the source CSV, thanks to compression
After removing unused columnsA noticeable reduction — often 20–40% on a wide table
After disabling auto date/timeA further reduction, larger if you had several date columns
.pbit templateA tiny fraction of the .pbix — usually kilobytes
The ratio is the insight
If your .pbit is 40 KB and your .pbix is 12 MB, then 99.7% of your file is data. That tells you immediately that optimising visuals or measures will do nothing for file size, and that the only lever that matters is what you load. Module 11 Lesson 2 covers this systematically.
09

Common Mistakes

Assuming a .pbix contains no data
Emailing a .pbix built on confidential data, thinking it is "just the report". In Import mode the data is inside the file.

Fix: Know your storage mode. If you need to share a design without data, export a .pbit template. Treat every Import-mode .pbix as containing everything it loaded.
Hiding columns to reduce file size
Hiding affects the Data pane only. The column is still loaded, still stored, still counted in the file size.

Fix: Remove unused columns in Power Query. Hiding is for usability; removing is for size.
Sending a .pbix with a local file path
The query points at C:\Users\you\.... The recipient can view the stored data but cannot refresh.

Fix: Use a shared path (SharePoint, OneDrive, a network drive) or a parameter for the file location. Check Data source settings before sending anything.
Relying on Desktop to recover unsaved work
There is no autosave for local files. A crash on a large model loses everything since your last save.

Fix: Ctrl+S constantly, and version by filename at meaningful milestones.
Editing in the service and in Desktop without deciding which wins
A colleague fixes a title in the service; you publish from Desktop next week and overwrite it. Nobody knows why the fix disappeared.

Fix: Decide explicitly where authoritative editing happens — normally Desktop — and tell the team. Module 12 covers the collaboration options properly.
10

Professional Tip

Parameterise your file paths from day one
In Power Query, create a parameter for the folder your source files live in (Home › Manage Parameters › New Parameter), then reference it in your queries instead of hard-coding a path.

Three things this gives you: the file works on anyone's machine, moving your data folder does not break anything, and a .pbit exported from it prompts the recipient for their own path on open — which turns a template into something genuinely reusable rather than a curiosity.

Module 3 Lesson 8 covers parameters in full. Adopting the habit now costs nothing.

Two more:

  • Write the README before you think you need it. Four lines — what it answers, where the data comes from, how to refresh, known assumptions. You will be the person who needs it, six months from now, having forgotten everything.
  • Keep a clean template of your own. A .pbit with your theme, your standard date table and your usual measures, and every new project starts twenty minutes ahead.
11

Knowledge Check

Knowledge Check

5 questions. Answer each one to see why the right answer is right.

Your .pbix is 180 MB. Which action would reduce it most?

What is the key difference between a .pbix and a .pbit?

You email a .pbix to a colleague. They can see all the numbers but cannot refresh. Why?

When you publish a .pbix to a workspace, what appears in that workspace?

Why is Ctrl+S more important in Power BI Desktop than in most applications?

12

Practical Challenge

Practical Challenge

Make a project portable

Take a working .pbix built from local files and make it something you could hand to a colleague, or open yourself on a different machine, with everything working. Then write a short handover note.

Requirements
  • Replace hard-coded file paths with a parameter
  • Remove every column your report does not use, and record the size before and after
  • Export a .pbit template with a useful description
  • Set up the project folder structure from section 04
  • Write a README covering purpose, sources, refresh instructions and assumptions
  • State one thing that would still break for a colleague, and how you would fix it

For the parameter: Home › Manage Parameters › New Parameter, type Text, and give it your folder path as the current value. Then in the query's Source step, edit the M to concatenate the parameter with the file name — the Advanced Editor makes this easiest.

For the last requirement, think about what a parameter does not solve. What else in a query is machine-specific or person-specific?

13

Solution

Try the challenge properly before opening this. Reading a solution you have not attempted feels like learning, but it is not.

A model answer

1 · Parameterising the path

Create a text parameter named DataFolder with a current value such as C:\bwb\data\. Then in the Advanced Editor, change the Source line from a literal path to a concatenation:

Power Query M · Parameterised source path
let
    Source = Csv.Document(
        File.Contents(DataFolder & "bwb-retail-sales.csv"),
        [Delimiter = ",", Encoding = 65001, QuoteStyle = QuoteStyle.Csv]
    ),
    #"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars = true])
in
    #"Promoted Headers"

Now anyone opening the .pbit is prompted for their own folder, and moving your data directory requires one parameter change rather than editing every query.

2 · Removing unused columns

Add a Table.SelectColumns step, or use Home › Choose Columns. On the sales table, if your report only covers revenue by month, channel and category, you can drop ShipDate, UnitPrice, Discount and COGS — keeping Profit if you report margin.

Record both figures. A typical result on this dataset is a reduction of roughly a quarter to a third, from four dropped columns on a thirteen-column table.

3 · The template

File › Export › Power BI template. In the description field, write something a recipient can act on:

A useful template description
"Retail sales reporting template. On open you will be prompted for DataFolder — enter the full path to the folder containing bwb-retail-sales.csv, bwb-products.csv and bwb-customers.csv, including the trailing backslash. Refresh takes about 30 seconds. Contains 3 report pages and 8 measures."

4 · Folder structure and README

Reference · Project layout
retail-reporting/
├─ data/          source CSVs — never edited by hand
├─ pbix/          retail-report-v3.pbix (working file)
├─ templates/     retail-report.pbit
├─ docs/          kpi-definitions.md, model-diagram.png, cleaning-log.md
└─ README.md

5 · The thing that would still break

Credentials and privacy levels
A parameter fixes the path. It does not fix credentials.

Power BI stores data source credentials per user, per machine — they are not in the file. When your colleague opens the template and points it at their folder, Power BI will still ask them to authenticate to that source, and to set a privacy level for it. For a local CSV that is a minor prompt they can click through. For a SQL Server source it means they need their own database access, which no amount of file preparation can provide.

How I would handle it: state it explicitly in the README — "you will be prompted for credentials on first refresh; for the CSV sources choose Anonymous / Organizational as appropriate" — and, for database sources, name who to ask for access. A handover note that anticipates the first thing that will go wrong is worth more than one that describes the happy path.
Why this challenge matters more than it looks
Portability is the difference between a report that is yours and a report that is the team's. A .pbix that only works on one laptop is a liability the moment that person is on leave. Every step here — parameters, a template, a folder structure, a README that names the failure mode — is about removing yourself as a single point of failure. That is a professional habit long before it is a technical one.
14

Lesson Summary

Key takeaways
  • A .pbix contains four things: queries, model, data and report. In Import mode the data is nearly all of the file size.
  • A .pbit template contains everything except the data — tiny, and it refreshes from source on open.
  • To shrink a file, remove columns in Power Query. Hiding does nothing for size.
  • Turn off auto date/time — it creates a hidden date table per date column.
  • A .pbix stores the connection path, not the source. Parameterise paths so files are portable.
  • Credentials are stored per user, per machine — they never travel with the file.
  • Publishing creates two artifacts in a workspace: a report and a semantic model.
  • There is no autosave for local files. Save constantly and version by filename.

Syllabus topics delivered

Saving .pbix projectspbix vs pbitUnderstanding the Power BI workspaceFile hygiene
15

Progress

Marking a lesson complete stores your progress in this browser and updates your BitWithBite learner dashboard. Nothing is uploaded anywhere.

Lesson complete — 14% of Power BI Mastery done
Progress saved. Keep the momentum: the next lesson builds directly on this one.