Best Practice Analyzer cheat sheet

Generated using Microsoft Designer (first attempt only)
 

Below is information to quickly get you started with the Best Practice Analyzer, plus some practical tips and tricks based on my experience with it. There are a lot of 3rd party helper tools that go along with Power BI, and this is one of the essentials.

What the Best Practice Analyzer does

The Tabular Editor Best Practice Analyzer conducts a fast, thorough check of Power BI semantic models, identifying violations of best practices. Note: You still must be reasonably well-versed in Power BI to interpret the results. This is not a substitute for Power BI training! It can also fix some issues automatically, though you must manually review and run the fixes and then make sure they actually worked.

The BPA works with semantic models in Power BI Premium/Fabric workspaces or Power BI Desktop, so if you don't have a dedicated capacity or PPU license, you will need the report to be downloaded to your machine.

The BPA’s scope is the semantic model only. Do not assume the BPA will find best-practice violations related to the report interface. This distinction is also critical when it comes to interpreting flags like “unused objects”: "unused" refers only to the model, not reports. Removing a column flagged as unused could break dependencies in reports.

How to use the BPA

First, you need Tabular Editor 2.x, which is a free third-party tool for Power BI. (Tabular Editor 3.x is paid but is not required to use the BPA.) If you are on a machine without rights to install software, there is a "portable" version of Tabular Editor you can run without installing anything.

Obtain the BPARules.json file from the Microsoft BPA GitHub repository. Import this file to load BPA rules into your environment. (You can find these directions here, Ctrl-F "setup". No reason to re-document them. Further, here is training on using BPA, from Microsoft.)

Understanding the BPA rules

The BPA interface is simple but can be hard to navigate within the panel. Additionally, the rule details are visible only on hover, a poor user experience.

Hover text explaining the rule

As an alternative to review and understand the rules that are being tested, load the BPARules.json file as a data source into Power Query in Power BI Desktop or Excel to view the rules in a tabular format, including explanations and links for further reading. This makes it easier to review and understand each rule’s purpose. Reviewing these rules offers valuable insights into Power BI best practices and why-- a good general Power BI learning opportunity.

Loading the BPARule.json file as a data source in Power Query
 

Reviewing the violations in your solution

Once it runs, the BPA interface can be cumbersome for reviewing violations. Instead, collapse all items, press Ctrl-A to select everything, and then Ctrl-C to copy the output.

Collapse all, Ctrl-A, Ctrl-C...

Paste the output into a spreadsheet.
This reveals more details than are visible in the interface and allows you to annotate or filter as needed.

... and paste into Excel

Even great developers are likely to find a lot of violations, but not all are created equally.

  • Rules focused on performance improvements are generally the most valuable and impactful. These rules are categorized within the BPA for easier identification. And if you have copied the violations to Excel, you can easily filter to them.
  • Some rules are subjective and may be fine or even good depending on the circumstances, ex., rules discouraging bi-directional relationships or transformations in Power Query.
  • Some recommendations, such as adding descriptions to every model item, are impractical, time-consuming, and ignorable.

Contact Form

Name

Email *

Message *