Power BI February 21, 2024 · 8 min read

New ways to optimize shared datasets in Power BI (1/2) The offline approach

Part 1 of a two-part series on dataset optimization. Use the free version of Measure Killer to find and remove unused columns, measures, and calculated columns from shared datasets.

Gregor Brunner Gregor Brunner
New ways to optimize shared datasets in Power BI (1/2) The offline approach

This article comprises the first part of a two-part series addressing dataset optimization strategies. The second part examines scenarios where datasets cannot be downloaded or all connected reports aren’t accessible, requiring paid external tools.

The Core Challenges

Problem 1: Growing Dataset Size

Shared semantic models expand both horizontally (through additional fields, columns, and tables) and vertically (via daily data accumulation without removal policies). Oversized datasets are inevitable at deployment, as it’s impossible to predict which data will never be queried.

Problem 2: Complex Report Dependencies

When numerous reports across multiple workspaces connect to a shared dataset, data lineage becomes complicated. The Power BI impact analysis feature reveals these hidden dependencies, particularly reports in workspaces lacking direct administrative access.

The Solution: Measure Killer

For Scenario 1 (where the dataset file and all reports are available locally), the free version of “Measure Killer” enables comprehensive model analysis.

Implementation Steps

Step 1: Open Dataset File

The dataset must be open in Power BI Desktop. After clicking “refresh ports,” the tool identifies the file.

Step 2: Add Dataset Pages

The system prompts whether to include dataset pages in analysis, ensuring all model usage receives consideration.

Step 3: Add Report Files

Users drag and drop connected report files (.pbix) into the left panel.

Step 4: Run Analysis

After clicking “run,” Measure Killer analyzes the entire ecosystem. A summary at the bottom-left displays what percentage of the data model is actively used across the model and all connected reports.

According to the tool’s documentation, it “checks if something is used in the model (relationships, column sorting, measures, calculated columns etc.) as well as in the report (visuals, filters, conditional formatting etc.) and it also checks your Power Query code.”

Removing Measures and Calculated Columns

Navigating to “Kill measures and calculated columns,” users can click “Kill all” to remove unused artifacts directly from the open Power BI file.

The tool maintains backups through its “Restore” function, with optional OneDrive synchronization. Following removal, newly unused artifacts (marked yellow) appear in a subsequent window.

Removing Unused Columns

The “Kill columns” section generates M code for Power Query implementation. The dropdown menu lists all tables containing unused columns, sorted by storage savings potential.

Users paste the generated code into Power Query’s Advanced Editor, replacing existing queries. This approach safely removes columns since the step can be edited or removed later through the “Applied steps” interface.

Completing the Process

After addressing all suggested queries and clicking “Close & apply,” the data reloads. Running Measure Killer again reveals the final results — ideally showing 100% utilization across the data model.

Additional Optimization Insights

Single-Use Artifacts: Even artifacts used only once might warrant removal if they’re solely referenced in relationships. An entire table could potentially be eliminated if its sole usage is maintaining a relationship and all other columns are unused.

Hidden Page Testing: Unused elements on hidden pages used exclusively for testing may be candidates for removal.

Transition to Part 2

The series concludes by directing readers to part 2 for scenarios involving datasets stuck in the Power BI Service, inaccessible datasets, or unknown report locations. Those scenarios require the paid Measure Killer version, with Git-integration offering version history protection before optimization occurs.

A free trial signup link is available here.