Rules / DAX Expressions

Column references should be fully qualified

error DAX_COLUMNS_FULLY_QUALIFIED · ported · model layer · scope: Measure, TablePermission, CalculationItem

What it checks

Measures and row-level security filters that refer to a column by its bare name, [Column], instead of 'Table'[Column].

Each finding names the object that holds the expression: a measure as [Total Sales], and a row-level security filter by the table it is written on, Sales, with the role in the detail, role Region.

Example

Fires the rule
table Sales
	column Amount
		dataType: decimal
		sourceColumn: Amount
	measure 'Total Sales' = SUM([Amount])
		formatString: #,0
After the fix
table Sales
	column Amount
		dataType: decimal
		sourceColumn: Amount
	measure 'Total Sales' = SUM('Sales'[Amount])
		formatString: #,0

Why it matters

In DAX a bare [Name] is the convention for a measure. A column written the same way reads as a measure to everyone who maintains the model, and the two behave differently in a row context, so the expression is misread before it is ever debugged. The bare form also breaks when the column moves to another table, or when a measure with the same name is added and the engine binds to that instead.

How to fix it

Put the table name in front of every column reference:

Total Sales = SUM ( 'Sales'[Amount] )

In Power BI Desktop, select the measure in the Data pane and edit it in the formula bar, which completes the qualified form as soon as you start typing the table name. A row-level security filter is edited under Modeling, Manage roles. In the TMDL file, edit the expression after measure 'Total Sales' =, or the filter after tablePermission Sales = inside the role. A finding that only the measure's KPI raises is fixed in the TMDL file, after targetExpression =, statusExpression =, or trendExpression = in the measure's kpi block, an edit Power BI Desktop keeps.

When to ignore it

There is no case for the bare form. The rule is worth reading as a warning rather than a style note: the reference that fires it resolved to a column because no measure of that name exists today, and the day someone adds one, the expression silently starts reading the measure instead. Qualifying it is what stops that.

To ignore this rule on one object, add annotation pbiplint.ignore = DAX_COLUMNS_FULLY_QUALIFIED under the object in its TMDL file. Power BI Desktop keeps the annotation. To turn the rule off for a whole project, set "DAX_COLUMNS_FULLY_QUALIFIED": "off" under rules in pbiplint.config.json.

Quirks

Ported from Microsoft's Best Practice Analyzer ruleset (opens in a new tab).

Check a model for this Improve this page (opens in a new tab)