

"Name": "Organize columns and hierarchies in display folders ",

"Expression": "IsVisible \nand () \nand not InPerspective.Any(it) ", "Scope": "Table, Measure, Hierarchy, DataColumn, CalculatedColumn, CalculatedTableColumn ", Otherwise, the objects will only be visible when connecting directly to the model. "Description": "Visible tables, columns, measures and hierarchies should be assigned to at least one perspective, if the Tabular Model uses perspectives. "Fi圎xpression": "SummarizeBy = AggregateFunction.None ", "Expression": "IsVisible \nand SummarizeBy \"None \"\nand (DataType = \"Double \" or DataType = \"Decimal \" or DataType = \"Int64 \") ",

Create measures for columns that are supposed to be summarized. "Description": "Set the SummarizeBy property of all visible numeric columns to \"None \", to avoid unintentional summarization in client tools. "Name": "Don't summarize numeric columns ", "Fi圎xpression": "DataType = DataType.Decimal ", Use Currency / Fixed Decimal Number (decimal) instead. "Description": "Floating point datatypes can cause unexpected results when evaluating values close to 0. "Name": "Do not use floating point data types ", "Expression": "IsVisible \nand string.IsNullOrWhitespace(FormatString) \nand (DataType = \"Int64 \" or DataType = \"DateTime \" or DataType = \"Double \" or DataType = \"Decimal \") ", "Description": "Visible measures should have their Format String property assigned ", "Name": "Provide format string for visible numeric measures ", "Expression": "IsVisible \nand string.IsNullOrWhitespace(FormatString) \nand (DataType = \"Int64 \" or DataType = \"DateTime \" or DataType = \"Double \" or DataType = \"Decimal \") \n ", "Scope": "DataColumn, CalculatedColumn, CalculatedTableColumn ", "Description": "Visible numeric columns should have their Format String property assigned ", "Name": "Provide format string for visible numeric columns ", "Expression": "Expression.IndexOf( \"TODO \", StringComparison.OrdinalIgnoreCase) >= 0 ", "Scope": "Measure, Partition, CalculatedColumn, CalculatedTable ", "Description": "Objects with an expression containing the word \"TODO \" (typically as a comment), should most likely be revisited. "Expression": "DependsOn.Any(Key.ObjectType = \"Measure \" and Value.Any(FullyQualified)) ", "Description": "Using unqualified measure references makes it easier to distinguish between column and measure references, and also helps avoid certain errors. "Name": "Measure references should be unqualified ", "Expression": "Tokenize().Any( \n Type = DIV and \n Next.Type INTEGER_LITERAL and \n Next.Type REAL_LITERAL \n) ", "Scope": "Measure, CalculatedColumn, CalculatedTable ", Instead, it is advised to always use the DIVIDE(,) function. "Description": "Calculated Columns, Measures or Calculated Tables should not use the division symbol in their expressions (/) unless the denominator is a constant value. "Name": "Avoid division (use DIVIDE function instead) ", "Expression": "DependsOn.Any(Key.ObjectType = \"Column \" and Value.Any(not FullyQualified)) ", "Scope": "Measure, CalculatedColumn, CalculatedTable, KPI ", "Description": "Using fully qualified column references makes it easier to distinguish between column and measure references, and also helps avoid certain errors.
BPA RULES TABULAR EDITOR CODE
If at some point Tabular Editor has an option to "warn" users before outside code is executed, I'll consider this (see discussion on #428)."Name": "Column references should be fully qualified ", This is why the current restrictions on the "apply fix" functionality for the Best Practice Analyzer exists, since it only allows changing a single property or calling a single method on an object iterated by the Best Practice Analyzer - an operation which is unlikely to be "dangerous". The consultant might then attempt to fix any best practice violations, not being aware that custom code would then be executing. It would be too easy for someone to send a gullible consultant a Model.bim file containing a malicious piece of code hidden as a best practice fix and then say, "Hey could you take a look at this file". So far, Tabular Editor does not allow execution of custom code unless you explicitly load a script into the Advanced Editor text box, or modify your CustomActions.json file. While I like the idea, I'm hesitant to add this feature without further investigation, as malicious users could use this feature to "hide" code inside a Best Practice Analyzer rule file or even inside an annotation of the model (since Tabular Editor allows rules to be stored as annotations).
