EnableYourData.com

Glossary

What is DAX?

DAX (Data Analysis Expressions) is the Power BI formula language for calculations and filters in a semantic model. You use DAX for measures such as revenue or margin and for role filters in row-level security.

DAX explained

DAX looks like Excel formulas, but it works on whole tables and columns rather than cells. The key concept is filter context: a measure such as revenue returns a different number depending on the filters in the report, such as a month, region or product. CALCULATE lets you change those filters within a calculation.

You use DAX in three places: in measures that recalculate on every click, in calculated columns that are filled during refresh, and in role filters for row-level security. Measures are usually preferred because they keep the model small.

DAX is not the same as SQL. SQL retrieves rows from a database, while DAX calculates within a semantic model with relationships and filters. A common mistake is moving too much logic into DAX that belongs in the data warehouse, so that definitions only exist in a single report.

Example

Acme Groothandel's BI specialist writes the measure Gross margin % = DIVIDE([Revenue] - [Cost of sales], [Revenue]). In the report, that same measure automatically shows margin per month, per branch or per product group, depending on what the user selects.

DAX in ENABLE

In the ENABLE SQL Explorer, customer admins can run DAX queries against the Power BI model. RLS in ENABLE links profiles or user tags to Power BI roles whose filters are written in DAX, optionally using CUSTOMDATA().

FAQ

Frequently asked questions

What is the difference between DAX and SQL?

SQL is the language for retrieving data from a relational database. DAX is the Power BI formula language for calculating within a semantic model, using filters that come from the report.

What is the difference between a measure and a calculated column?

A measure calculates when you view the report, based on the active filters. A calculated column is computed row by row during refresh and stored in the model.

Is DAX hard to learn?

The basics resemble Excel and are quick to pick up. Filter context and CALCULATE take more practice, but they are the key to correct calculations.

Use AI on your own data. Securely, and without the headache.

In an online demo we show how ENABLE makes your data securely available and how you build on it: describing an app in the AI Builder, plain-language questions, dashboards and APIs. And how we set it up and manage it for you.