Measure Killer Measure Killer

These docs are still being polished — a few sections and screenshots are on the way. Spotted something off? Let us know.

Clean up an Analysis Services model (SSAS & AAS)

Remove unused objects from SQL Server and Azure Analysis Services Tabular models. Cleanup is more manual than for Power BI — generate a C# script to remove DAX artifacts, or export the list of unused objects and work through it in your modeling tool.

Why this is different from Power BI cleanup

Cleaning up an Analysis Services model is more manual than cleaning up a Power BI semantic model, and the reasons are structural:

  • No automatic cleanup. The one-step removal paths Measure Killer offers for Power BI semantic models — Clean TMDL, 1-click cleanup, and Kill DAX — don’t apply to Analysis Services models. Measure Killer doesn’t write changes back into an SSAS/AAS model for you.
  • No M / Power Query layer. Analysis Services Tabular models have no Power Query (M) code, so anything that works through M — including the “Kill columns” approach that generates an M expression to drop unused columns — simply doesn’t exist here. Column removal is handled in your modeling tool instead.
  • You apply the changes. Measure Killer’s job on AS models is to tell you precisely what’s unused (see Find unused objects in Analysis Services models) and hand you something actionable. Applying the removal is a manual step you run yourself.

What you can do

After running the used/unused analysis, you have two ways to act on the results.

Generate a C# script to remove DAX artifacts

Measure Killer can generate a C# script that removes the unused DAX artifacts — measures, calculated columns, and calculated tables — from the model. Run the script against the model in a tool that executes C# against Tabular models (for example, Tabular Editor) to apply the removals in one pass.

This is the closest thing to automated cleanup for Analysis Services: you still run the script yourself, but you don’t have to delete each artifact by hand.

Export the list of unused artifacts

If you’d rather work through the changes manually — or hand the list to whoever owns the model — export the full list of unused objects. Use it as a checklist in your modeling tool, or as the scope definition for a migration (only carry over what’s used).

A typical workflow

  1. Run the Analysis Services used/unused analysis and review what’s flagged unused.
  2. Decide your path:
    • Bulk DAX removal — generate the C# script and run it against the model.
    • Manual / migration — export the list of unused artifacts and work through it in your modeling tool.
  3. Apply the changes in your tooling.
  4. Re-run the analysis to confirm the model is now lean and nothing you kept depends on something you removed.