dax_lint
Lint DAX expressions offline or in live models to catch anti-patterns like FILTER in CALCULATE and unknown AI-hallucinated functions, with line-severity rewrite hints.
Instructions
PURE OFFLINE DAX static linter - no live session needed for a raw expression (the gap run_bpa cannot cover: linting a CANDIDATE expression before it is applied). Pass expression for offline lint; or sessionId to lint live measures (all, one table's, or one measure via table+measure). Rules with line numbers, severity and a rewrite hint: FILTER(wholeTable) inside CALCULATE, nested CALCULATE, '/' where DIVIDE belongs, IFERROR wrapping, '+ 0' blank suppression, EARLIER usage, SUMMARIZE used for aggregation, and UNKNOWN_FUNCTION - the AI-hallucinated-function catcher, checked against a maintained static catalogue (model UDFs auto-admitted in session mode; admit new engine functions via extraFunctions, comma-separated).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | No | with sessionId: restrict to one table | |
| measure | No | with sessionId: restrict to one measure | |
| sessionId | No | live model sessionId - lints measures instead of a raw expression | |
| expression | No | a raw DAX expression to lint offline (mutually exclusive with sessionId) | |
| extraFunctions | No | comma-separated extra function names to accept as known |