Data Analysis Expressions
   HOME

TheInfoList



OR:

Data Analysis Expressions (DAX) is the native formula and
query language A query language, also known as data query language or database query language (DQL), is a computer language used to make queries in databases and information systems. In database systems, query languages rely on strict theory to retrieve informa ...
for
Microsoft Microsoft Corporation is an American multinational corporation and technology company, technology conglomerate headquartered in Redmond, Washington. Founded in 1975, the company became influential in the History of personal computers#The ear ...
PowerPivot,
Power BI Microsoft Power BI is an interactive data visualization software product developed by Microsoft with a primary focus on business intelligence (BI). It is part of the Microsoft Power Platform. Power BI is a collection of software services, app ...
Desktop and SQL Server Analysis Services (SSAS) Tabular models. DAX includes some of the functions that are used in Excel formulas with additional functions that are designed to work with relational data and perform dynamic aggregation. It is, in part, an evolution of the Multidimensional Expression (MDX) language developed by Microsoft for Analysis Services multidimensional models (often called
cubes A cube or regular hexahedron is a three-dimensional space, three-dimensional solid object in geometry, which is bounded by six congruent square (geometry), square faces, a type of polyhedron. It has twelve congruent edges and eight vertices. It i ...
) combined with Excel formula functions. It is designed to be simple and easy to learn, while exposing the power and flexibility of PowerPivot and SSAS tabular models.


Background

The Data Analysis Expressions (DAX) language provides a specialized syntax for querying Analysis Services tabular model. DAX is not a
programming language A programming language is a system of notation for writing computer programs. Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
. DAX is primarily a formula language and is also a
query language A query language, also known as data query language or database query language (DQL), is a computer language used to make queries in databases and information systems. In database systems, query languages rely on strict theory to retrieve informa ...
. You can use DAX to define custom calculations for Calculated Columns, Measures, Calculated Tables, Calculation Groups, Custom Format Strings, and filter expressions in role-based security in Tabular models. The same Analysis Services engine for Tabular models is also used in Power BI and
Power Pivot Power Pivot, formerly known as PowerPivot (without spacing), is a self-service business intelligence feature of Microsoft Excel which facilitates the creation of a tabular model to import, relate, and analyze data from a variety of sources. Powe ...
for Excel. Power BI also uses DAX for conditional formatting expressions and other dynamic properties of visual components.


History

DAX was developed by the SQL Server Analysis Services team at Microsoft as part of Project Gemini and released in 2009 with the first version of the PowerPivot for Excel 2010 Add-in. Both DAX and MDX can be used to query PowerPivot and Tabular models, however only MDX may be used to query multidimensional SSAS models (cubes) in versions of SSAS up to SQL Server 2012 RTM. Future versions of SSAS (both multidimensional & tabular models) will support DAX natively. 2016 marks a significant improvement with the rapid adoption of Microsoft Power BI and SQL Server 2016. Power BI is a subscription-based self-service analytic tool and Power BI Desktop is a desktop analytic and report authoring application. SQL Server 2016 includes a new release of SQL Analysis Services Tabular with many improvements over previous versions. Enhancements to the DAX language after 2015 include support for calculated tables, automatic date table generation, variables and a total of 340 functions.


DAX data types

DAX can compute values for seven
data type In computer science and computer programming, a data type (or simply type) is a collection or grouping of data values, usually specified by a set of possible values, a set of allowed operations on these values, and/or a representation of these ...
s: * Integer * Real * Currency * Date (datetime) * TRUE/FALSE (Boolean) * String * Variant The BLOB (binary large object) data type is managed by the Tabular model but cannot be directly manipulated by DAX expressions. DAX has a powerful type-handling system so that you do not have to worry much about data types. When you write a DAX expression, the resulting type is based on the type of the terms used in the expression and on the operator used. Type conversion happens automatically during the expression evaluation. However, if an expression might return different data types depending on the conditions, then the data type of the expression is defined as Variant.The Variant data type is used for expressions that might return different data types, depending on the conditions.


References

* * * * * * * * {{Authority control Data management * Data analysis software Microsoft software Database management systems