Start here
Lessons and reference
Look things up
Start here
SQL
Power Query
Data modeling
Power BI and DAX
Finance playbooks
Run queries
Build and check
Format a DAX formula into a standard layout and check it for common mistakes, all in your browser.
Format a formula to list its functions. A name links to its reference page when the page exists.
Press Check my formula. Errors are likely to stop the formula working. Warnings are often wrong or slow. Tips are good practice.
Paste a measure or a calculated column.
Choose a line width and press Format. Function names link to the reference.
Errors, warnings and tips show what to fix before you run it.
The formatter reads your formula with a small tokenizer before it changes anything, so it knows what is code and what is text. A string such as "VAR RETURN" and a comment such as // note or /* note */ are kept exactly as you wrote them. Table names such as 'Date'[Date] and column references such as Sales[Amount] are treated as single names and are not changed.
Then the formatter lays out the code. VAR and RETURN each start a new line. A function call stays on one line while it fits the line width you pick. When a call is too long, each argument goes on its own line, indented four spaces, and the closing bracket sits under the function name.
The checker reads the same tokens. It looks for an unclosed text string or bracket, a SUM, AVERAGE, MIN or MAX over a calculation (use the X version instead), a measure used inside a true or false filter in CALCULATE, a FILTER over a whole table, IFERROR, EARLIER, a comparison with BLANK() made with an equals sign, a division with the slash character instead of DIVIDE, and a VAR with no RETURN.
No. Measure names, column names, table names and text strings are left as written. Only the capitals of function names and the keywords VAR, RETURN, DEFINE, MEASURE, EVALUATE, IN, NOT, AND, OR, TRUE and FALSE can change, and you can turn that off.
It is longer than the line width you chose. Pick a larger width, or choose No limit, to keep each call on one line.
No. The formatter and the checker run in your browser. The page only reads the list of function reference pages from this site, so it can add links.
The checks look at the pattern of the text, not at what the formula means. A warning such as "IFERROR hides real mistakes" is advice, not proof of a bug. Read the message, then decide.
More tools: all tools · function reference · guides