The DAX module lets eMondrian answer DAX queries — the language Power BI uses over a live connection. This page explains how it works, what to expect and how to report problems.

How it works

Power BI visual
   │  DAX query over XMLA
   ▼
eMondrian DAX module
   │  maps tables, columns and measures to the cube model
   ▼
eMondrian engine
   │  SQL (results cached per client session)
   ▼
your database

In DAX terms, a cube appears as a set of tables: dimensions become tables with columns for their attributes, and measures belong to a table as well. A measure from the HR cube in FoodMart is written 'HR'[Org Salary].

Measures are evaluated by the same engine that answers MDX, so a measure defined once in the schema gives the same result in Excel (MDX) and Power BI (DAX).

The DAX module also serves the model metadata Power BI reads to build its field list. That’s why Power BI needs a valid key even before running any query.

Coverage

Power BI generates a wide range of DAX. The DAX module targets the queries produced by common visuals — tables, matrices, charts, cards, slicers, filters, Top N, hierarchy drill-down, tooltips and conditional formatting. Over a live connection Power BI doesn’t let you write report-level DAX, so what matters for reports is these generated queries; the function list below matters mostly when you write DAX yourself (DAX Studio, MCP, tests).

Test your own reports during the evaluation: connect them to eMondrian and check that every visual loads and the numbers match.

Functions and syntax

As of Community 2026.11.07.2 (server 10.0.84, modules 0.0.0.97). The DAX module supports these functions:

CategoryFunctions
TableROW, ADDCOLUMNS, SELECTCOLUMNS, SUMMARIZE (with ROLLUP and ROLLUPGROUP), SUMMARIZECOLUMNS (with ROLLUPADDISSUBTOTAL), VALUES, ALL (a column, several columns or a table), FILTER, TOPN, SAMPLE, GENERATE, GENERATEALL, TREATAS, CALCULATETABLE, KEEPFILTERS, REMOVEFILTERS, NONVISUAL
Filter contextCALCULATE — with comparisons, OR, IN, conditions on several columns, ALL, KEEPFILTERS, REMOVEFILTERS
Iterators and countingSUMX, AVERAGEX, MINX, MAXX, COUNTX, CONCATENATEX, COUNTROWS
LogicalIF, SWITCH, AND, OR, NOT, COALESCE
InformationISBLANK, ISEMPTY, ISSUBTOTAL, ISINSCOPE, HASONEVALUE, SELECTEDVALUE, BLANK
TextCONCATENATE, UPPER, LOWER, LEFT, RIGHT, MID, LEN, TRIM, REPLACE, SUBSTITUTE, SEARCH, EXACT, FORMAT
MathABS, ROUND, ROUNDUP, ROUNDDOWN, INT, CEILING, FLOOR, MOD, POWER, SQRT, LOG, DIVIDE, VALUE
Date and timeDATE, YEAR, MONTH, DAY, HOUR, MINUTE, NOW, TODAY, EOMONTH, WEEKDAY, DATEDIFF
eMondrian extensionDATAMEMBER — a parent-child member’s own value

Syntax: EVALUATE, DEFINE MEASURE, DEFINE VAR, VAR … RETURN inside expressions, ORDER BY, ASC / DESC (or 1 / 0) wherever a sort order goes, comments and table constructors { … }. Operators: + - * / &, = <> != < <= > >=, && ||, IN { … }, = BLANK() / <> BLANK() and unary minus.

Things that work differently from DAX in Power BI or Analysis Services Tabular:

  • Aggregation lives in the cube’s measures. Reference measures by name ([Unit Sales] or 'Sales'[Unit Sales]). SUM, AVERAGE, MIN, MAX, COUNT and DISTINCTCOUNT over a column return an error that names the cube measure to use instead.
  • Time calculations (year-to-date, same period last year, prior year) are calculated members in the cube, not DAX functions — see Schema reference.
  • No report-level measures. Over a live connection Power BI doesn’t offer New measure, Quick measure or Visual calculation — see Power BI limitations.

Writing DAX by hand

When you write DAX yourself — in DAX Studio, through the MCP execute_query tool, or in tests:

  • Measures can be written with their table, 'HR'[Org Salary], or without it, [Org Salary].
  • Name the cube when a catalog has more than one (FoodMart has six). Through MCP, pass the cube argument; a catalog with one cube (OnTime) needs none.
EVALUATE ROW("Org_Salary", 'HR'[Org Salary])

Report a failing query

  1. In Power BI Desktop: Performance analyzer → Copy query for the failing visual.
  2. Copy the error message, and if possible the relevant lines of mondrian.log.
  3. Open an issue with the query, the error and the eMondrian version.

Real-world queries help us improve compatibility.

Licensing

The DAX module ships with Community and needs a key with the DAX module — the 30-day evaluation key includes it. See Editions & modules.