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 »


Syntax

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

API

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


Discussion

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.





Mastering DAX Video Course






Support Us

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

DAX Formatter by SQLBI DAX Formatter by SQLBI
<a href="http://www.daxformatter.com?utm_source=badge-light&utm_medium=ad&utm_campaign=embed"><img src="http://www.daxformatter.com/wp-content/themes/daxformatter/images/daxformatter-badge-small-light.png" alt="DAX Formatter by SQLBI"></a>
<a href="http://www.daxformatter.com?utm_source=badge-dark&utm_medium=ad&utm_campaign=embed"><img src="http://www.daxformatter.com/wp-content/themes/daxformatter/images/daxformatter-badge-small-dark.png" alt="DAX Formatter by SQLBI"></a>


Latest Changes

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).

October 20, 2016:

Added support to UNICODE function

The UNICODE function is now supported.

October 11, 2016:

Improved support of SUMMARIZECOLUMNS syntax

Now SUMMARIZECOLUMNS formats correctly even when there are no columns before table expressions or aggregations, and/or when there are multiple tables before the aggregations.

September 9, 2016:

DISTINCT with a table expression

Added support for DISTINCT syntax with a table expression. For example, DISTINCT ( UNION ( a, b ) ) is now formatted correctly (it was generating a syntax error before).

August 19, 2016:

Added support to USERPRINCIPALNAME function

The USERPRINCIPALNAME function available in Power BI is now supported.

August 16, 2016:

Updated syntax for ISCROSSFILTERED

The ISCROSSFILTERED function can receive a table argument instead of a column.

June 9, 2016:

Support for order by arguments in CONCATENATEX

The order by arguments in CONCATENATEX are now supported. At the moment ASC/DESC are mandatory in DAX Formatter, even if they could be omitted in Power BI.

May 29, 2016:

Support for variations in column reference

The syntax ‘tablename'[date column].[Year] is now supported. This syntax provides access to the level of hierarchies in automatic date tables created by Power BI.

April 20, 2016:

Support for table expression in DISTINCT

The DISTINCT function accepts also a table expression as an argument.

Support for optional parameters in CONCATENATEX

The CONCATENATEX function can have optional parameters to define the order of the table to use to concatenate values in a string.

January 17, 2016:

Support for DATATABLE function

The new DATATABLE function is now supported by DAX Formatter.

December 9, 2015:

Fixed security issue

Fixed security issue found by Suraj Sawant (Paladion Networks).

November 8, 2015:

Added support for ASC/DESC in TOPN function

The TOPN function now accepts ASC/DESC for sort direction parameter (it was 0/1 or FALSE/TRUE in past versions of DAX, Power BI Desktop introduced the new syntax).