The Data Analysis Expressions (DAX) language is a formula based language designed to help with custom calculations in PowerPivot tables. It resembles existing Excel formulas and it is designed to work with relational data. There are three main components to the DAX formula
- Functions – perform operations such as adding values, summing or performing logical tests
- Operators – determine how values are going to be compared or calculated (+, -, *, <, >)
- Values – data obtained from columns, tables. It cannot reference individual cells through.
- Expression – defines a literal or Boolean value.
However, there is one main difference between regular Excel formulas and DAX functions. The DAX functions utilize tables and columns in contrast to Excel formulas that rely on ranges. Its power comes from capability to perform complex lookups, aggregation and data retrievals.
The DAX language utilizes in-memory engine and due to this fact, it can analyze very large amounts of data unlike Excel formulas, which become progressively slow as you add more data to Excel file.
There are several functions that DAX exposes to use.
- Date and Time
- Time Intelligence
The DAX functions can return tables as its results versus one value only in Excel formulas. The DAX functions capable to perform row by row calculations. It utilizes filter for retrieving particular values from the columns. There are a lot more other types of capabilities available in DAX.
DAX has AutoComplete capability. It will present a list of available functions which start with “r” if you type only one letter in the formula bar.
Examples of DAX