Back to List

Using Tabular Editor’s Best Practice Analyzer to Apply Best Practices

Cory Cundy Cory Cundy  |  
Feb 02, 2021
 
In this blog, Scott Hietpas and Cory Cundy – two principal consultants in Skyline Technologies’ Data Analytics practice – explore the advantages of using Tabular Editor for tabular model development. For the full presentation and demo, check out their webinar: How to Divide and Conquer Tabular Model Development as a Team.
 
The Best Practice Analyzer available with Tabular Editor can be useful from a development standpoint, from a consistency standpoint, and when working with (or training) team members without much exposure to tabular models. We touched on this feature briefly on our overview of Tabular Editor advantages but wanted to break the topic out in more detail.
 

How Does Best Practice Analyzer Work?

When working with Tabular editor, you can import rule files for Best Practice Analyzer to run. These rules look across your model and identify all the places that aren’t consistent. This is a nice way to find any mistakes or areas where those best practices might not have been followed. If you’d like to see this feature in action, our Tabular Editor webinar includes a demo.
 

Common Tabular Model Best Practice Rules

Standard example rule files are available on GitHub, and you can customize them for the best practices of your team and organization. We share a few powerful best practices below.
 

Qualified and Unqualified Measures in DAX

One well-known best practice in developing tabular models when writing DAX is to always fully qualify your column names and to not put your table names in front of your measures. Best Practice Analyzer can look for column references that should be fully qualified and measure references that should be unqualified in your DAX expressions.
 

Not Summarizing Numeric Columns

“Don't summarize numeric columns” is another good rule for Best Practice Analyzer to help you enforce. For example, in a date table, if you have a month number attribute that has values of 1 through 12 for your month number, you generally don't want to be aggregating those numbers because it doesn't make sense. They're more useful as an attribute or a slicer. The Analyzer will look for numeric columns where the summarization is not set to none.
 

Limiting Measures in Your Fact Table

Some rules I run with the Best Practice Analyzer may be more about user preference than hard and fast industry best-practices. For example, if I have more than 10 measures in my fact table, the tool can suggest that I start using display folders or other display options. If 10 is not your number and 12 is, then you can change the JSON file that the rule is built off of and the Analyzer will look according to that rule.
 

Using Best Practice Analyzer

When Best Practice Analyzer runs against your model, it will let you know how many rule violations you have and give you some additional functionality. In the example I used in our webinar demo, I had an AdventureWorks model where Best Practice Analyzer found 122 objects in violation across 10 different practices of 10 different rules. When you get your results, you can right click on them.
 
If you want to modify the issue yourself, you can “Go to Object” easily. You can also ignore violations. Sometimes there is a violation instance that you know is against the rule, but you have a reason in that instance to ignore the rule. It will stay in your results marked as “Ignored”, but we can always get back to it with the, "Show Ignored."
 
With other rules, we can generate and fix them on the fly. An example of this might be, "Hide Foreign Key Columns." Generally, you don't want to expose your foreign key columns. If I want to fix that issue, I can apply effects directly in Tabular Editor that will go through and change that property or column to be hidden.
 
You can do that in bulk or – if you want to go one step further – you can “Generate fix script” to generate more of this advanced scripting-type logic. This essentially does the same thing as the “Apply fix” option, but it lets you see the code that would be used to apply the fix. With that you can sometimes see what it's doing and how to use it. You can also learn things about the object model.
 

Finding Rule Scripts for Best Practice Analyzer

One question we get about this Analyzer is what standard best practices are available and where to find the rules that can be fed into it. We’ve covered some rules above, but many more are available on the GitHub site where you can find the source code for Tabular Editor. Remember, all these best practices are customizable for the needs of your team and your organization.
 
To wrap up, Best Practice Analyzer is a powerful feature that lets you drive consistency across models. Even with manual code reviews, you're not likely to catch every one of these small issues. Plus, it lets you learn something about the code behind the scenes.
 

 

Love our Blogs?

Sign up to get notified of new Skyline posts.

 


Related Content


Blog Article
Power BI Tips for Star Schema and Dimensional Data Modeling
Marcus RadueMarcus Radue  |  
Feb 16, 2021
In this blog, Marcus Radue, Data Analytics Engineer, offers high-level guidance in the advantages of star schema and dimensional data modeling in Power BI reporting. For a full overview on this topic, watch the full video below.   Using a dimensional data model, especially when...
Blog Article
The Advantages of Using Tabular Editor for Tabular Model Development
Scott HietpasScott Hietpas  |  
Jan 19, 2021
In this blog, Scott Hietpas and Cory Cundy – two principal consultants in Skyline Technologies’ Data Analytics practice – explore the advantages of using Tabular Editor for tabular model development. For the full presentation and demo, check out their webinar: How to Divide and...
Blog Article
Power BI Governance: Refining and Maintaining Your Power BI Strategy
Marcus RadueMarcus Radue  |  
Nov 10, 2020
In this blog series, Marcus Radue, Data Analytics Engineer at Skyline Technologies, offers high-level guidance for implementing Power BI effectively in your organization. For a full overview on this topic, check out the original Power BI Governance A-Z Webinar.  Sharing content, report...
Blog Article
Power BI Governance: Data Gateway Management
Marcus RadueMarcus Radue  |  
Oct 27, 2020
In this blog series, Marcus Radue, Data Analytics Engineer at Skyline Technologies, offers high-level guidance for implementing Power BI effectively in your organization. For a full overview on this topic, check out the original Power BI Governance A-Z Webinar.   In previous blogs in this...
Blog Article
Power BI Governance: Report Design Strategy
Marcus RadueMarcus Radue  |  
Oct 13, 2020
In this blog series, Marcus Radue, Data Analytics Engineer at Skyline Technologies, offers high-level guidance for implementing Power BI effectively in your organization. For a full overview on this topic, check out the original Power BI Governance A-Z Webinar.   After you have your...