Code action DI003
(Improvement) Remove table name from measure references
Description
Measure references should not include the table name, as the table name is unnecessary when referencing measures.
Example
Change:
'Internet Sales'[Internet Total Sales] * 1.25
To:
[Internet Total Sales] * 1.25
Why is Tabular Editor suggesting this?
In most situations, column references must be qualified by the table name. However, for measure references, the table name is always optional (since measure names are always unique within a model).
Thus, a best practice is to always reference measures without the table name, and always reference columns with the table name.
By applying this practice consistently, you make your code more concise and easier to read, and you make it easier to distinguish between measure references and column references.
Remarks
This code action has an (All occurrences) variant, which will appear when multiple sections of code can be improved. This variant will apply the code action to all relevant sections of the document at once.