DAX Syntax Checker & Formatter
Power BI says “The syntax for ‘)’ is incorrect” and points at the wrong character. Paste the formula here to see the real mistake marked in place, why it breaks, and a fix you can apply with one click. Once it's clean, get it back formatted and readable.
Set in File → Options and settings → Options → Global → Regional settings. Most DAX online uses standard.
6 errors and 1 warning
Every one has a safe automatic fix: the corrected formula is below.
Open High Risks = VAR Threshold = 15 CALCULATE1( COUNTROWS(Risk Register2), Risk Register3[Score] >= Threshold, Risk Register4[Status] !=5 “Closed”6,7 )
- 1
Missing RETURN before this line
ErrorLine 3, column 1The VAR definitions above end here, and the next expression needs RETURN in front of it.
- 2
Table name with spaces needs single quotes
ErrorLine 4, column 15DAX reads "Risk Register" as separate words. A table name with spaces must be quoted: 'Risk Register'.
- 3
Table name with spaces needs single quotes
ErrorLine 5, column 5DAX reads "Risk Register" as separate words. A table name with spaces must be quoted: 'Risk Register'[Score].
- 4
Table name with spaces needs single quotes
ErrorLine 6, column 5DAX reads "Risk Register" as separate words. A table name with spaces must be quoted: 'Risk Register'[Status].
- 5
- 6
Curly “smart” quotes
ErrorLine 6, column 30DAX only recognizes the straight " character. Blogs, Word, Outlook, and Teams often swap in curly quotes when you copy a formula.
- 7
Trailing , before )
Likely errorLine 6, column 38A separator right before the closing bracket promises another argument that never comes. That's almost always a syntax error.
Fixed formula
Every automatic fix applied, and it checks clean.
Open High Risks =
VAR Threshold = 15
RETURN
CALCULATE(
COUNTROWS('Risk Register'),
'Risk Register'[Score] >= Threshold,
'Risk Register'[Status] <> "Closed"
)Free, with no sign-in and no request limit. Everything runs in your browser, and nothing you paste is sent anywhere.
What it checks: brackets and parentheses, commas and semicolons, straight vs. curly quotes, table names that need quoting, VAR and RETURN, operators borrowed from other languages (!=, AND, IN with parentheses), Excel-only functions, and the argument counts of common functions. It doesn't know your model, so it can't tell whether a table, column, or measure name actually exists.
How it formats: function calls that fit on a line stay on one line; longer ones put each argument on its own line, indented four spaces. VAR and RETURN get their own lines, operators get spaces, and long conditions break before each && and ||. Comments are kept. Before showing a result, the formatter re-reads both versions and checks they contain exactly the same code apart from spacing and capitals; if anything else would differ, it leaves the formula alone. Formatting happens in your browser, so formulas from a confidential model never leave your machine.
Every cause is explained with examples in The Syntax for ‘...’ Is Incorrect. Formula parses but gives the wrong number? Start with DAX basics, or browse all the Power BI tools.