Product July 18, 2024 · 4 min read

Using What if? analysis to achieve higher levels of optimization in Power BI

After removing unused measures, use Measure Killer's What if? analysis to identify underused artifacts and drastically reduce model size.

PS
Pedro Smiderle
Using What if? analysis to achieve higher levels of optimization in Power BI

Ever needed to clean up a report because it was getting too big and too slow? Was it hard to know what could or should be removed because the dependencies weren’t clear? That’s what this post is about.

One of the main purposes of the product Measure Killer is to do exactly that within Power BI, by analyzing data models and determining what is being used or not. The new tool “What if? analysis” takes that one step further by aiding the removal of underused artifacts too.

To lower its size, the first step is to run Measure Killer and remove all the unused measures and columns from the report, freeing up space. After that, the report consists of 100% used artifacts:

Output of Measure Killer after cleaning up the Sales report

Even so, sometimes that is not enough, because the data can still be used in non-important or non-optimized ways. In that case, it’s crucial to know what’s being used by each page, visual, measure, to know what could be removed. That’s where “What if? analysis” can help.

What if there is a test page in a report which is hidden and not actually needed? The “What if? analysis” can be run in its “page” mode.

Page mode in the What if? analysis mode selection window

Output of the Page mode for the Sales report

In the output, the “T. Tip: Updates” page is exclusively using 44% of the model’s size. Deleting it could cut down the model size by almost half.

Expanding the “T. Tip: Updates” page reveals all columns used exclusively on that page:

Expanded dependencies of the T. Tip: Updates page

All measures and columns marked with a green checkmark in the “Potential savings” column are used only on this page in the Sales report.

Since the information this tooltip provides is not that useful to the report, removing this page completely frees up space. Upon removing it and running Measure Killer again, the report’s size drops to 1.5 MB, almost half of the initial size:

Final size of the Sales report, after removing the T. Tip: Updates page

Conclusions

By using Measure Killer and “What if? analysis”, it’s possible to drastically lower the model size of a Power BI report. The same principle can be applied to more complex examples, like live reports connected to a semantic model in the Power BI Service.