These docs are still being polished — a few sections and screenshots are on the way. Spotted something off? Let us know.
Find and remove unused measures and columns in Power BI
Safely remove every unused column and measure in your Power BI semantic model — shrink model size, speed up refreshes, free up RAM, and lower your Fabric capacity bill. Compares Clean TMDL, 1-click cleanup, Kill DAX and Kill columns.
Last updated · May 29, 2026
Run a scan first. “Unused” is something Measure Killer’s Where-used scan tells you. If you haven’t run one yet, start with the desktop walkthrough at Run your first scan or the online one at Run your first online scan — the rest of this doc assumes you’re already looking at a finished Where-used table.
Why clean up matters
Every unused column and measure in a semantic model has a cost. The metadata is loaded into memory, included in refreshes, indexed by AI features, and counted toward your capacity — even when nothing actually queries it. Cleaning out the dead weight pays off in several ways:
- Faster refreshes. Less metadata and fewer columns in scope means less work per refresh cycle.
- Smaller in-memory footprint. Power BI’s VertiPaq engine loads the entire model into RAM. Dropping unused columns can shrink the footprint by 30–80% on a typical untended model — Power BI Desktop stops thrashing the local machine, and the model fits comfortably in a smaller Fabric SKU.
- Lower capacity bill. If your model size is what’s forcing you to pay for an F32 or F64, trimming it down can let you step down a tier — directly saving money every month.
- Better Copilot / AI features. AI tooling indexes everything in the model. Unused tables and measures muddy lineage and surface as irrelevant suggestions.
- General performance. Smaller model = faster page loads, snappier visuals, less wire traffic.
What counts as “unused”
Measure Killer uses four statuses: green (used), red (unused), yellow (“used by unused” — only referenced by objects that are themselves unused), and unused (remove manually) for objects like calculated table columns that need manual intervention. Clean TMDL and 1-click cleanup remove red and yellow objects — and fully-unused calculated tables — in one pass.
For the full definition — what counts as a reference, how scan scope affects confidence, and edge cases to watch — see How Measure Killer defines used and unused.
Removal methods
Measure Killer gives you four ways to remove unused objects. Each has different requirements and trade-offs — choose the one that fits your situation. Whichever you pick, you’re acting on Measure Killer’s industry-leading 99.99% reference detection, so the unused list you remove is one you can trust.
Cost: the gate is where you run the analysis, not which removal
method you pick. A local analysis — a
desktop scan of a .pbix or
.pbip file — is free, and so is any cleanup you do from it. An
online analysis (a shared-model
or tenant scan) already needs a paid
Enterprise license or a trial, so everything downstream of it — the
cleanup included — is paid.
| Method | What it does | Where it works |
|---|---|---|
| Clean TMDL (recommended) | Exports a cleaned TMDL definition with unused objects stripped out — including fully unused calculated tables | Local .pbix / .pbip, or Service models on Premium / PPU / Fabric |
| 1-click cleanup | Removes all unused objects — a clean new .pbip (offline) or written directly to a Service model (online) | Local .pbip projects, or Service models on Premium / PPU / Fabric |
| Kill DAX | Removes individual DAX measures and calculated columns with auto-backup | Local files, or Service models on Premium / PPU / Fabric |
| Kill columns | Generates an M expression that removes unused columns — you paste it into Power Query yourself | Local files (Desktop), or a Service model via Transform data |
About removing Power Query columns: whichever method you use, Measure Killer removes an unused column by appending a step that drops it from the query output — it never rewrites your source query. The column is still fetched at the source and then dropped, so you reclaim memory but not refresh time. To stop fetching it at the source, edit the upstream Power Query step yourself.
Clean TMDL (recommended)
Clean TMDL is our recommended approach. It exports a complete TMDL definition of your semantic model with every unused column, measure, and table removed — a clean copy you can review before applying.
How it works
- Run a scan and identify unused objects.
- Click Export clean TMDL in the toolbar. Measure Killer copies the cleaned TMDL to your clipboard.
- In Power BI Desktop, open the TMDL view and paste the clean TMDL into a new tab.
- Preview the changes in the TMDL view to verify what will be removed, then apply them from Power BI Desktop. Measure Killer generates the clean TMDL; it doesn’t apply it for you.
For Git-deployed models, you can also save the TMDL output to files, commit to your repo, and let your CI/CD pipeline deploy it.
Why we recommend it
- Reviewable. You see exactly what’s being removed before anything changes. Diff the clean TMDL against the original to verify.
- Version-controllable. The output is plain-text TMDL files that fit into your existing Git workflow.
- Deploy it your way. Unlike 1-click cleanup, applying the clean TMDL doesn’t need XMLA write on the capacity — paste it into Power BI Desktop, or commit it to Git and deploy through your pipeline. (Generating it from a model in the Service still needs an online scan, so a Premium / PPU / Fabric workspace, not Pro; from a local file, nothing special.)
- Most complete. Removes everything in one pass: unused columns, measures, calculated columns, and fully unused calculated tables.
- Handles columns too. Unlike Kill DAX (which only handles DAX artifacts), Clean TMDL also removes unused Power Query columns by adding a step at the end of the Power Query transformations that safely removes those columns. This step can always be adjusted or removed later if you decide to keep the columns.
- Batch operation. One export removes all unused objects at once — no item-by-item selection.
Downsides
- Extra step. You paste the TMDL into Desktop’s TMDL view before applying — one more step than 1-click cleanup, which produces the cleaned model for you. But that extra step is also what makes it reviewable.
1-click cleanup (Kill via XMLA)
1-click cleanup removes all unused artifacts in one go — you don’t pick and choose (that’s what Kill DAX is for). It comes in two flavors, depending on where the model lives:
- Offline — local
.pbip(free). It doesn’t change your current file. Instead it generates a new, clean.pbip— the same folder structure with every unused object already removed, just like applying the clean TMDL to your model. Your original is left untouched. The one catch: the new.pbipholds metadata only, so you’ll need a full data refresh the first time you open it. - Online — Service model (paid). It writes the removal directly to the live model over the XMLA endpoint — no download, no new file — revertible via Power BI’s version history. Needs a Premium / PPU / Fabric workspace.
Either way there’s no copy-paste into the TMDL view — Measure Killer produces the cleaned model for you.
How it works
- Run a scan that includes the model — a local
.pbix/.pbipscan, an online scan, or a tenant-wide scan. - Click 1-click cleanup. It removes every unused artifact at once — there’s no list to review and no per-item selection.
- Online, the change is written to the model immediately;
offline, you get a fresh, clean
.pbipto open and refresh.
Reverting changes
Offline there’s nothing to undo — your original .pbip was never
modified, so just keep using it.
Online, most semantic models now have built-in version history: the last 5 changes are tracked and any version can be restored, so an unintended cleanup can be rolled back in the Service. Version history must be enabled as a tenant setting — see Version history for all semantic models for setup and current limitations.
Upsides
- No copy-paste. Unlike Clean TMDL, you don’t paste anything into the TMDL view — Measure Killer produces the cleaned model for you.
- Same coverage as Clean TMDL. Removes the same object types — columns, measures, calculated columns, and fully unused calculated tables — and applies the cleaned Power Query M, not just the model metadata.
- Non-destructive offline. The local path never touches your
original
.pbip; you get a separate clean copy.
Downsides
- No review, no picking and choosing. 1-click removes every unused artifact at once — there’s no preview of what will go, and no per-item selection. Want to review the changes first? Use Clean TMDL. Want to remove specific measures one at a time? Use Kill DAX.
- Offline: needs a full refresh. The new
.pbipcontains metadata only, so you have to run a full data refresh the first time you open it. - Online: requires XMLA Read/Write. Writing to a model in the Service goes through the XMLA endpoint — a Premium, PPU, or Fabric workspace (not Pro), with the endpoint set to Read/Write at the tenant or capacity level.
Prerequisites (Service models)
- Workspace on Premium / PPU / Fabric capacity
- XMLA endpoint set to Read/Write at the tenant or capacity level
- Workspace Contributor (or higher) role
Kill DAX
Kill DAX is the legacy, more manual approach for removing individual DAX measures and calculated columns — both from local files and Service models. It gives you more control than Clean TMDL (item-by-item selection with automatic backup) but is slower for bulk cleanup. It’s scoped to DAX artifacts only (not columns, tables, or relationships).
How it works
- Run a scan and identify unused DAX measures or calculated columns.
- Switch to the Kill DAX artifacts tab.
- Select the items to remove.
- Confirm — Measure Killer removes them from the model (via XMLA for Service models, directly for local files).
Prefer to apply the removal yourself? Kill DAX can instead generate a C# script for the removal, which you can run in Tabular Editor — or any other tool that scripts against the Tabular Object Model (TOM). Going this route skips Measure Killer’s automatic backup, though — the script just removes the artifacts, so keep your own copy first.
DAX backup & restore
When you remove a DAX artifact via Kill DAX, Measure Killer
automatically backs up the expression to
%APPDATA%\Measure Killer\backups. You can restore any backed-up
artifact into any semantic model — make sure you pick the correct
target model.
For teams, point the backup folder to a shared OneDrive location so everyone on the team sees what was removed and can restore if needed. This also creates an audit trail of all removals.
Power Query columns are automatically backed up through an additional step in your M code when removed via 1-click cleanup.
Upsides
- Granular. Remove one measure at a time with a clear audit trail in the backup folder.
- Restorable. Every removed expression is backed up and can be restored with one click.
Downsides
- DAX only. Cannot remove columns, tables, or relationships — use Clean TMDL or 1-click cleanup for those.
- XMLA prerequisites for Service models. Applying to a model in the Service goes through the XMLA endpoint — so a Premium, PPU, or Fabric workspace, not Pro (the same setup as 1-click cleanup). Editing a local file in Power BI Desktop has no such requirement.
- One-by-one. Less efficient than Clean TMDL for bulk cleanup.
Kill columns
Kill columns is the legacy, more manual approach for removing unused
Power Query columns. It generates a modified M expression with an extra step appended at the end. By
default Measure Killer uses Table.RemoveOtherColumns (keeps only
the used columns), but you can switch to Table.RemoveColumns
(removes only the unused columns) if you prefer. You copy the new
expression and paste it into Power Query’s Advanced Editor — the
unused columns are excluded from the query output, so they’re no
longer loaded into the model.
It works in every edition, including the free desktop app.
How it works
- Run a scan and identify unused columns.
- Switch to the Kill columns tab.
- Measure Killer shows the new M expression for each table — the original query with an added step that removes the unused columns.
- Copy the expression, open Transform data → Advanced Editor, and paste it in — in Power BI Desktop for a local file, or on the semantic model in the Power BI Service. Measure Killer only generates the code; it can’t apply it for you.
- Close & apply — the unused columns are no longer loaded.
Upsides
- Free. Available in every edition, including the free desktop app.
- Safe. You review the M expression before pasting — nothing changes until you apply it yourself.
- Reversible. Remove the added step in Power Query to restore the columns.
Downsides
- Columns only. Cannot remove measures, calculated columns, or tables — use Kill DAX or Clean TMDL for those.
- Manual. Copy-paste per table — less efficient than Clean TMDL for models with many tables.
- Measure Killer can’t apply it for you. Kill columns only generates the M code — you paste it in yourself. For a model already published in the Service that means editing the M via Transform data. If you want Measure Killer to remove columns from an online model automatically, use 1-click cleanup instead.
Which method to use
| Scenario | Recommended method |
|---|---|
| First cleanup of a model — want to review before applying | Clean TMDL |
| Git-deployed model with CI/CD | Clean TMDL (commit the output) |
| Quick removal from a live Service model | 1-click cleanup |
| Remove a few specific DAX measures with backup | Kill DAX |
| Remove unused columns (free edition) | Kill columns |
| Online model with no XMLA (e.g. a Pro workspace) | Manual — export the unused list, a Kill DAX C# script, and the Kill columns M (see below) |
| Scheduled automated cleanup | 1-click cleanup via MK Automation |
Model with no local .pbix | 1-click cleanup or Clean TMDL (deploy via XMLA) |
When in doubt, use Clean TMDL — it’s the safest, most reviewable option whenever Measure Killer can generate it.
No XMLA endpoint? Clean up manually
For a model in the Service whose workspace has no XMLA endpoint — a Pro workspace, for instance — Measure Killer can still analyze the model, but it can’t generate a clean TMDL or run 1-click cleanup (both read and write the full model over XMLA). Clean up by hand instead:
- Export the list of unused items and work through them.
- Export a C# script for the unused DAX artifacts (measures and calculated columns) and run it in Tabular Editor.
- Copy the Kill columns M and paste it into the model’s Transform data → Advanced Editor — for every query that has unused columns.
Downloading the model as a local .pbix / .pbip gives you the full
toolset back — local cleanup needs no XMLA.
Delete safely
Rules of thumb before you bulk-delete anything:
- Trust the status, but mind the scope. An Unused status in a
desktop scan only means nothing in this
.pbixreferences the object. If the model is shared, run the scan online so every downstream report, Excel file, and chained model is included — that’s what makes the Unused status reliable enough to delete on. - Talk to downstream owners. If the online lineage shows reports in workspaces you don’t own, give those owners a heads-up before you remove anything they might (re)introduce a dependency on.
- Keep a backup. Save a copy of the original file first. Clean TMDL has no automatic backup — in Power BI Desktop’s TMDL view, keep the current (unoptimized) TMDL in its own saved tab as your backup, then paste Measure Killer’s optimized TMDL into another tab and preview the changes before applying (or apply directly). Kill DAX removals, by contrast, are backed up automatically and restorable.
What changes after cleanup
Hit Analyze again to confirm the change took effect. If the model is in the Service, expect the next scheduled refresh to be measurably faster and the in-memory size to drop in the workspace settings.
Related
- How Measure Killer defines used and unused — the exact rules and the four statuses
- Clean your model — advanced optimization suggestions beyond just unused objects
- Best-practice analysis (reports + models) — the broader set of cleanup recommendations