dax_suggest_rewrite
Apply safe mechanical rewrites to DAX expressions: divide becomes DIVIDE, remove trailing +0, collapse simple FILTERs, and get hints for unfixable findings along with the full updated expression.
Instructions
Concrete BEFORE/AFTER rewrites for a DAX expression's lint findings - pure offline, no session. Mechanical fixes are applied: 'a / b' -> DIVIDE(a, b), IFERROR(x / y, alt) -> DIVIDE(x, y, alt), a trailing '+ 0' removed, and FILTER(Table, single-column predicate) inside CALCULATE collapsed to the bare predicate. Findings with no safe mechanical fix (EARLIER, SUMMARIZE aggregations, nested CALCULATE, ...) come back as hint-only notes. Also returns the full suggested expression with every non-overlapping rewrite applied.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes | the DAX expression to rewrite | |
| extraFunctions | No | comma-separated extra function names to accept as known |