Data Analysis Expressions (DAX) is a formula language introduced by Microsoft in Power Pivot and Analysis Services Tabular to define calculations and queries.

DAX Formatter is a free tool by SQLBI that transform your raw DAX formulas into clean, beautiful and readable code.
The syntax rules used improves the readability of the expressions, if you want learn more read the article Rules for DAX Code Formatting »


You can format any DAX query and expression in the form:
  • Table[column] = …
  • Table[measure] := …
  • [measure] := …
  • [measure] = …
  • measure := …
  • measure = …
  • = …


You can call the service via standard HTTP GET and POST requests. Learn more »


DAX Formatter is not working as expected?
Please fill out the form as completely as possible.

Note: the current formula will be automatically attached to the request.

Support Us

If you use DAX Formatter for your posts, please embed our badge:

DAX Formatter by SQLBI DAX Formatter by SQLBI
<a href=""><img src="" alt="DAX Formatter by SQLBI"></a>
<a href=""><img src="" alt="DAX Formatter by SQLBI"></a>

Latest Changes

January 6, 2018:

Fixed bug in CONCATENATEX syntax

Fixed bug in CONCATENATEX syntax using “order by” parameter (fourth argument) without following order argument (fifth argument).

November 12, 2017:

Added support to COMBINEVALUES function

Added support to the COMBINEVALUES function, which has introduced in Power BI Desktop November 2017. This function concatenates values using the delimiter passed in the first argument. The syntax is COMBINEVALUES ( , , [, …, ] )

August 14, 2017:

Added support to GENERATESERIES function

Added support to the GENERATESERIES function (it is used in Power BI to generate tables for the What-If parameter).

July 30, 2017:

Added support to TOPNSKIP function

Added support to the TOPNSKIP function. The TOPNSKIP function is not documented, but it is generated by Power BI when user browse data in a table when designing a model.

July 7, 2017:

Support for double quotes in strings

You can include double quotes in a string literal by using two consecutive double quotes (“). For example, “Litware 20″” Box Fan E401 Black” is now a valid string.

July 6, 2017:

Added support to SELECTEDVALUE function

The function SELECTEDVALUE is now supported. It’s a shortcut for IF ( HASONEVALUE ( Column ), VALUES ( Column ) , )

July 5, 2017:


The argument after KPITARGETFORMATSTRING is now formatted correctly (it must be a string delimited by single quotes, the formatter syntax was erroneously expecting a string within double quotes).

July 3, 2017:

Added support to UNICHAR, DETAILROWS, ERROR, and USEROBJECTID functions

The functions UNICHAR, DETAILROWS, ERROR, and USEROBJECTID are now supported.

February 11, 2017:

Added support to TREATAS function

The TREATAS function is now supported.

February 6, 2017:

Support for comments at the end of a statement

The comments after the last statement are now included in the formatted output. Please note that using DAX Editor the comments after a measure definition are always attached to the next object defined in the script.

January 14, 2017:

Support to variables used in time intelligence functions

The dates expression used in time intelligence functions can be a variable name, which has the same syntax of a table name.

January 9, 2017:

Added support to KPI properties for DAX Formatter

Added support for a number of additional properties added in DAX Formatter for measure definitions, in order to support KPI definition.

December 9, 2016:

Added support to variable as literals

A variable can be used in place of a literal, if the variable is assigned to a literal.

December 3, 2016:

Added support to VAR/RETURN in filter arguments

The use of variables (syntax VAR/RETURN) was not working if used in filter arguments of CALCULATE and CALCULATETABLE.

November 12, 2016:

Support for IN operator

Added support for IN operator and minor improvements in properties for measure formats (for DAX Editor).