Check Rules
The 27 rules behind DAX Lint and the Model Documenter. A rule fires only on what the text or the model proves. Errors stop a measure saving, warnings are usually wrong, and notes are worth a look.
DAX Rules
- Error Unbalanced parentheses
unbalanced-parens - Every opening parenthesis needs a closing one. The measure will not save.
- Error Column used without aggregation
naked-column - A measure has no current row, so a bare column reference outside any function cannot return a value. Wrap it in SUM, MAX, SELECTEDVALUE or an iterator.
- Warning Division with /
slash-division - When the denominator is zero, or blank while the numerator is not, the / operator returns Infinity or NaN, and visuals show it. DIVIDE returns BLANK (or the alternate result you pass), which visuals skip. Division by a non-zero number literal cannot hit zero, so it is not flagged.
- Warning IFERROR or ISERROR
iferror - Error handling can push DAX into slower, cell-by-cell evaluation, and it hides the cause. Test the condition that produces the error instead, or use DIVIDE for division.
- Warning FILTER over a whole table inside CALCULATE
filter-whole-table - FILTER ( Table, ... ) as a CALCULATE argument filters every column of the expanded table, which is slower and can override filters on related tables. Filter the columns you mean: CALCULATE ( [m], Table[col] = "x" ), or FILTER ( ALL ( Table[col] ), ... ).
- Warning SUMX over a single column
sumx-single-column - SUMX ( T, T[col] ) is SUM ( T[col] ) with more to read. Keep the iterator for expressions that combine columns.
- Note Table cleared inside an iterator
transition-cleared - Inside SUMX, ADDCOLUMNS, FILTER and other iterators, CALCULATE first turns the current row into a filter, then applies REMOVEFILTERS, ALL or ALLSELECTED. If the cleared table is a fact related to what you iterate, its expanded table holds that dimension, so the row you are on is cleared too. Other filter arguments are evaluated before the row becomes a filter, so VALUES ( Date[Date] ) there returns the outer period, not the row. Without the model the linter cannot tell whether the tables are related, so this is a note. To keep the row, capture it first: VAR RowDates = CALCULATETABLE ( VALUES ( Date[Date] ) ), then pass RowDates as a filter.
- Note CALCULATE with nothing to change
calculate-no-filter - CALCULATE with only an expression and no filter arguments changes nothing at the top of a measure, because a measure already runs in the filter context of the visual. It does matter inside an iterator, where it turns the row into a filter, and the rule does not fire there.
- Note IF over HASONEVALUE
hasonevalue-if - IF ( HASONEVALUE ( T[c] ), VALUES ( T[c] ), alternate ) is what SELECTEDVALUE ( T[c], alternate ) does, in one call that reads as what it means.
- Note Deeply nested IF
nested-if - Three or more IFs chained through their else branch read better as SWITCH ( TRUE (), condition1, result1, condition2, result2, ..., else ), which also keeps the closing parentheses from piling up.
- Note DIVIDE returns 0 instead of blank
divide-zero-alternate - DIVIDE ( a, b, 0 ) turns every empty cell into a zero. Visuals keep rows whose measure is not blank, so a table by product and month fills with rows of zeros for combinations that never happened, and a zero averages into any AVERAGEX over the measure. Leave the third argument out unless a zero really means zero.
- Note Repeated expression
repeated-expression - The same expression appears more than once in this measure. A VAR evaluates it once and names it, which helps both speed and reading.
- Note TODAY or NOW
today-utc - In the Power BI service these return UTC time, so a report read in the evening in the Americas can already be on tomorrow. Use a date column from the data or a refresh-date table when the boundary matters.
Model Rules
- Warning Relationship filters both ways
two-way-filter - A bidirectional relationship lets a filter flow from the many side back to the one side. Results then change depending on which tables carry a filter, paths become ambiguous once there are several, and queries slow down. Prefer single direction and use CROSSFILTER inside the one measure that needs it.
- Warning Key column summarizes
summarized-key - A key column set to sum or count invites a visual that adds up IDs. Set Summarize by to None on every key.
- Note Money stored as a floating-point number
float-money - Decimal number (double) can show rounding drift in totals. Fixed decimal number (decimal in TMDL) stores four decimal places exactly, which suits currency.
- Note Month text column with no sort column
month-no-sort - If this column holds month names, it sorts alphabetically (Apr, Aug, Dec). Set Sort by column to the month number. A text month like 2026-03 already sorts correctly.
- Note Foreign key visible to report authors
visible-foreign-key - The many-side key of a relationship is rarely useful in a report, and authors who drag it in get the fact key instead of the dimension attribute. Hide it.
- Note Measure has no format string
measure-no-format - Without a format string a numeric measure shows raw numbers, such as 0.6283 for a percentage. Set one on the measure so every visual agrees. Measures that return text are skipped.
- Warning Source is a file on a local or network drive
local-file-source - A path like C:\ or \\server\share is read from the machine that refreshes the model. In the Power BI service that needs an on-premises data gateway that can see the same path, and a path on one person's PC breaks the scheduled refresh. Move the file to SharePoint, OneDrive or a lakehouse, or set up the gateway on purpose.
- Note Hard-coded source address
hardcoded-source - The same server, database or URL is typed into several partitions, or the server is localhost, which only the machine doing the refresh can reach. Put it in a parameter (a shared expression) so moving between dev, test and production, or to a new server, is one change instead of one per table.
- Warning Security role with no filters
rls-empty-role - A role with read permission and no table filters lets its members see every row. If that is intended (an all-access role), name it so; otherwise add the filter before anyone is added to it.
- Note Row-level security filter on a fact table
rls-on-fact - Filtering the dimension (plant, region, customer) lets the relationship carry the filter to every fact that joins it, and keeps the rule in one place. A filter on the fact itself covers only that table and is evaluated over its rows.
- Note Several roles with fixed values
rls-static-roles - Each role hard-codes a value, so every new plant or region needs a new role and someone to maintain its members. A single dynamic role that looks up USERPRINCIPALNAME () in a mapping table scales with one row per user instead.
- Note Measure referenced with a table name
qualified-measure-ref - Writing Table[Measure] makes a measure look like a column. The usual convention is the opposite: always qualify columns (Table[Column]) and never measures ([Measure]), so a reader can tell at a glance which references carry context transition.
- Note Column referenced without its table
unqualified-column-ref - A bare [Column] in a measure reads like a measure reference. Qualify columns with their table so a reader can tell them apart, and so the reference survives a measure being added later with the same name.