DAX flags
Two flags, both measuring the same thing: a formula complicated enough to be worth a second look.
| Flag | What it finds | Severity |
|---|---|---|
| Complex DAX measures | Measures with a complicated formula | warning |
| Complex DAX columns | Calculated columns with a complicated formula | warning |
Complex DAX columns
A calculated column is flagged here when its formula is complex. Every calculated column, complex or not, is also listed by its own Calculated column flag.
How complexity is measured
The analyzer scores each formula on nine signals. A signal that stays under its limit contributes nothing, so a formula that is merely long is never flagged on length alone.
| Signal | Flagged above | Weight |
|---|---|---|
| Length in characters | 900 | 1 |
| Length in lines | 25 | 1 |
| Nested brackets | 6 deep | 2 |
IF / SWITCH branches | 4 | 2 |
| Nested control functions | 4 deep | 2 |
CALCULATE / CALCULATETABLE calls | 3 | 3 |
Row-by-row iterators — SUMX, AVERAGEX, RANKX and similar | 3 | 3 |
Virtual tables — SUMMARIZE, ADDCOLUMNS, UNION and similar | 2 | 3 |
| The same heavy function repeated | 4 times | 2 |
The weights say what actually matters: length is the least interesting thing about a formula. Size carries weight 1, structure 2, and the operations that cost query time — context transitions, row-by-row iteration, building tables in memory — carry 3.
| Total score | Result |
|---|---|
| Below 6 | Not flagged |
| 6 to 13.9 | Flagged, Medium complexity |
| 14 and above | Flagged, High complexity |
Each finding comes with the signals that fired and concrete advice, for example "Deeply nested brackets (depth 9). Extract inner logic into VAR/RETURN blocks" or "Multiple virtual table constructions (5). These materialize at query time and hurt performance".