Input
Paste DAX, then choose an action.
Loading editor...
Monaco editor is enabled with SQL-syntax fallback and auto-indent. Format executes locally.
81 / 50,000 chars
Power BI tools
Format DAX fast. Use AI only when you need an explanation.
Input
Loading editor...
Monaco editor is enabled with SQL-syntax fallback and auto-indent. Format executes locally.
81 / 50,000 chars
DAX (Data Analysis Expressions) is the formula and query language for Power BI, Analysis Services Tabular models, and Excel Power Pivot. It enables dynamic aggregations, time intelligence, and row-level security in data models.
The most important DAX function. Modifies filter context before evaluating an expression.
CALCULATE( [Total Sales], Product[Color] = "Red" )
Declare variables for readability and performance. Variables are evaluated once and can be reused.
VAR TotalQty = SUM(Sales[Quantity]) VAR AvgPrice = AVERAGE(Sales[Price]) RETURN TotalQty * AvgPrice
FILTER returns a table. SUMX, AVERAGEX iterate row-by-row over that table.
SUMX(
FILTER(
Sales,
Sales[Amount] > 1000
),
Sales[Amount]
)Copy your DAX measure or query and paste it into the Monaco editor. The editor supports syntax highlighting and auto-indent.
Click Format to restructure your DAX with consistent indentation, line breaks after each argument, and aligned parentheses.
Click AI Explain for a step-by-step plain-English breakdown of what your DAX formula does, including filter context and evaluation order.
Copy the formatted output to clipboard, or generate a shareable URL that preserves your code for teammates.
DAX (Data Analysis Expressions) is the formula language used in Power BI, Analysis Services, and Excel Power Pivot. Well-formatted DAX is easier to read, debug, and maintain — especially for complex measures with nested CALCULATE, FILTER, and VAR/RETURN patterns.
The formatter handles CALCULATE with filter arguments, nested FILTER/SUMX/ADDCOLUMNS iterators, VAR/RETURN variable declarations, SWITCH/TRUE conditional logic, and deeply nested expressions. It preserves string and number literals while restructuring the surrounding syntax.
No. The formatter only adjusts whitespace, indentation, and line breaks. It does not rename columns, reorder arguments, or modify any business logic. String literals and numeric constants are preserved exactly as written.
After formatting, click Share URL to generate a link that encodes your DAX code in the URL parameters. Anyone with the link sees your formatted code. No data is stored on the server.
More tools